• Resolved Jerome

    (@market4android)


    Hi. I’d like to know, if we’re using a static page created in the Pages menu in wp-admin as our blog’s homepage, can we NOT post that pageview to the database every time the homepage is called? The POST to and reply from admin-ajax.php is taking over 4 seconds on my server, which is highly delaying my pageloads. So, is there a way that I can immediately stop this POST from happening on my homepage only? That’s going to be the deciding factor of whether I keep using this plugin or not, and after all the work I put into trying to figure the code out for it, I would REALLY hate to have to find another plugin. Please help. Thanks!

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Jerome

    (@market4android)

    Hey Dev, can ya answer me?

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Jerome,

    That’s something I didn’t think of before. Try this:

    # Open wordpress-popular-posts.php using an editor such as Notepad or Dreamweaver.
    # Find this:

    // if we're on a page or post, load the script
    if ( (is_single() || is_page()) && !is_user_logged_in() ) {

    # … and change it to:

    // if we're on a page or post, load the script
    if ( (is_single() || is_page()) && !is_user_logged_in() && !is_front_page() ) {

    # Save changes.

    Thread Starter Jerome

    (@market4android)

    Thanks! this removed 2 seconds off each home-pageload!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WordPress Popular Posts] Can we NOT use POST (to admin-ajax.php) for static homepage!!’ is closed to new replies.