Support » Plugin: WordPress Popular Posts » Different markup for the first post – Possible?

  • Hi Hector,

    I would like to display the popular posts output by this plugin’s widget using

    <li>{thumb} {title} {summary} <a href="{url}" class="wpp-read-more">[Read more]</a></li>

    HTML markup for the first post

    and

    <li>{title}</li>

    for the rest.

    Is this doable?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Andrew Miguelez

    (@andrewmiguelez)

    I don’t believe this is possible through the plugin settings. However, you could easily decide what to display and hide with CSS. If you include all of the data as you show in your example for the first post, then you can target certain elements or classes in your CSS.

    Like so:

    .popular-posts li .thumb,
    .popular-posts li .summary,
    .popular-posts li .wpp-read-more {
        display: none;
    }
    .popular-posts li:first-child .thumb,
    .popular-posts li:first-child .summary,
    .popular-posts li:first-child .wpp-read-more {
        display: block;
    }
    

    Thanks Andrew. Not an ideal solution, but should be ok..

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Different markup for the first post – Possible?’ is closed to new replies.