Support » Plugin: WordPress Popular Posts » Enable PHP for own HTML in widget

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

    (@hcabrera)

    Hi there,

    No, that can’t be done since the WPP widget can’t parse PHP functions / scripts – and I won’t add such a feature because: 1. it’ll make things overly complicated, and 2. because you already can do something like this to modify the standard HTML output. With it, you could call PHP functions as well. Make sure you read the entire topic as it contains info that you should be aware of.

    I decided to use the customized TEXT-widget of WordPress to achieve what I want. I am using “wpp_get_mostpopular()” and all those tags together with a shortcode which contains all PHP that I need.

    By the way: How much does this plugin affect the load time of the website? As far as I can see the plugin catches every single view of a post? Does´nt this slows down the entire website?

    Plugin Author Hector Cabrera

    (@hcabrera)

    As far as I can see the plugin catches every single view of a post?

    Yep, otherwise how would the plugin track page views?

    Does´nt this slows down the entire website?

    Nope, updating the views count should be fairly quick on most websites.

    Yes, thanks for your feedback. Unfortunately all kind of views are counted – I don´t know if it were bots or crawlers but even when no real visitor visited my site, I saw that views were counted. There should be something like an intelligent filter here – just like in Google Analytics, where those bots are also not counted (for at least 90% or so).

    Plugin Author Hector Cabrera

    (@hcabrera)

    Yep, I’m aware of that. I posted a simple workaround here that should keep most bots out the statistics for the time being until WPP 3.0 is ready.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Enable PHP for own HTML in widget’ is closed to new replies.