Support » Plugin: WordPress Popular Posts » Appending extra code to the end of the HTML markup

  • Hi,

    Fantastic plugin, I got a client who wants to add a “see all articles” link to the end of the HTML your plugin generates. I have a widget area which takes in your plugin as a widget and I’ve selected the “HTML Mark Up” option to generate my own layout of the posts.

    Before / After Title:

    Before / After Posts:

    Post HTML Mark up:

    <h3>{title}</h3> <p>{summary}</p></li>

    What I want to do is add a <div> block after the </ul> which contains a link to the category specified by your the filter’s form under the “Category(ies) ID(s):” field. I’ve edited the plugin to do that, however I’m afraid that when you update the plugin, my code will be overwritten. My question is:

    Can you tell me how to call the content that generates the HTML markup, or provide a function for me to add onto the plugin to do what I require without editing the actual plugin code itself (e.g a hook inside functions.php file).

Viewing 1 replies (of 1 total)
  • Plugin Author Héctor Cabrera


    Hi there,

    Actually there’s a hidden, experimental filter on the plugin which might be what you’re after: wpp_html. Use add_filter to hook into it (example).

    I must say that being it an experimental feature chances are that it’ll change over time. I might rename it and/or modify its code, so I’d keep an eye on the plugin once I release the new 3.0 version (which I’ll be pushing to Github first once I’m done with a few things).

Viewing 1 replies (of 1 total)
  • The topic ‘Appending extra code to the end of the HTML markup’ is closed to new replies.