WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
Ajaxify causes Widget to Disappear (and views inaccurate) (3 posts)

  1. justaleaf
    Member
    Posted 1 year ago #

    Last week, we updated out site to 3.5.1 and all of it's plugins as well. This was mostly uneventful and we love the WPP plugin!

    However, after this update we seem to have 2 new problems.

    First, we noticed a big drop in our view counts for our popular posts. Or other tracking tools (3 others) all showed now decline in traffic outside of our usual averages, but WPP was now showing massive decreases (from 1,000+ views each day to 20-40 instead).

    Second, I read that others who had count issues utilized the "Ajaxify" feature to resolve it, so I tried this next. Every time I have attempted this though, the widget on the sidebar vanishes. I can see it's HTML divs in the code view, but they are all empty. This does not change when I clear the cache (using Hypercache, as we have with previous versions in conjunction with WPP).

    I've puzzled over this and thought I might bring it here incase anyone may have an idea as to why the widget does not load at all following use of the Ajaxify feature? And, more importantly, if Ajaxifying the widget will correct the view count disparity?

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

  2. jeremydelacasa
    Member
    Posted 11 months ago #

    I have the same problem.

  3. Héctor Cabrera
    Member
    Plugin Author

    Posted 11 months ago #

    This is theme-related, guys. The Ajaxify feature requires that the register_sidebar function to pass the ID and class on the 'before_widget' parameter.

    In your theme's functions.php file, the register_sidebar function should look like this:

    <?php $args = array(
    	'name'          => __( 'Sidebar name', 'theme_text_domain' ),
    	'id'            => 'unique-sidebar-id',
    	'description'   => '',
            'class'         => '',
    	'before_widget' => '<li id="%1$s" class="widget %2$s">',
    	'after_widget'  => '</li>',
    	'before_title'  => '<h2 class="widgettitle">',
    	'after_title'   => '</h2>' ); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.