• Resolved digestsua

    (@digestsua)


    Great plugin, thanks a lot.
    But after a week of active usage I need to shift fields – date and category BEFORE the title.
    Category is not critical for site logic, but date and time …should be shifted to the first place.
    How to do that? Problem is: date field is a span, not div therefore floating model doesn’t work.
    Thanks a lot for fast reply.
    Vadym

    • This topic was modified 5 years, 8 months ago by digestsua.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter digestsua

    (@digestsua)

    Problem solved by editing of functions.php

    /**
     * Display Posts Shortcode - Move image after title
     * @see https://displayposts.com/2019/01/04/move-the-image-after-the-title/
     *
     */
    function be_dps_move_image_after_title( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class, $author, $category_display_text ) {
      $output = '<' . $inner_wrapper . ' class="' . implode( ' ', $class ) . '">' .$date .'&nbsp;&nbsp;&nbsp;' . $title . $image . $author . $category_display_text . $excerpt . $content . '</' .     $inner_wrapper . '>';
      return $output;
    }
    add_filter( 'display_posts_shortcode_output', 'be_dps_move_image_after_title', 10, 11 );
    Plugin Author Bill Erickson

    (@billerickson)

    Thanks for finding the solution before I had a chance to respond!

    For more information, see this article on using the output filter: https://displayposts.com/docs/the-output-filter/

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Date and time before the title’ is closed to new replies.