• Resolved rinchent

    (@rinchent)


    I’m creating a section in my website where it will display popular posts but also displays the posts content.

    How can I do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi there!

    The answer is: it depends. What exactly are you trying to achieve and how are you planning to do it with WPP? (some actual code might help, if you’re using any.)

    Thread Starter rinchent

    (@rinchent)

    Thanks for the reply.

    I would like to essentially display the title of the post (which I can currently do), but also below it would like to show the actual content the post has.

    Right now just using this to display the title and views:

    <?php
    if (function_exists(‘wpp_get_mostpopular’))
    wpp_get_mostpopular();
    ?>`

    • This reply was modified 8 years, 1 month ago by rinchent.
    Plugin Author Hector Cabrera

    (@hcabrera)

    Thanks, that helps!

    Try this:

    <?php
    if ( function_exists('wpp_get_mostpopular') ) {
    
        $args = array(
            'excerpt_length' => 55, // That's 55 characters!
            'post_html' => '<li>{thumb} {title} <div class="wpp-excerpt">{summary}</div></li>' // Tell WPP to include the excerpt for each post using the {summary} tag! (for more, check Settings > WordPress Popular Posts > Parameters)
        );
        wpp_get_mostpopular( $args );
    
    }
    ?>
    Thread Starter rinchent

    (@rinchent)

    That is perfect, thank you!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display a posts content?’ is closed to new replies.