Support » Plugin: Popular Posts Tabbed Widget for Jetpack » Bullets showing

Viewing 9 replies - 16 through 24 (of 24 total)
  • haha idk what to say because it’s there for me.

    http://tinypic.com/r/5lay2r/8

    I just deleted the widget. uninstalled the plugin. reinstalled and reloaded it into the sidebar. try again if you could: http://hiphopspeakeasy.com

    Plugin Author Ryann Micua

    (@pogidude)

    there you are 🙂

    Now, here’s what I found, the javascript file of the plugin isn’t loading anywhere in the page. To see for yourself, go to the homepage, hit Ctrl + u to view source, then do a find for tab.js file.

    If it’s there, it should show up somewhere in the <head> like this: http://tinypic.com/r/zklah3/8

    on your site, it’s not there.

    assuming you didn’t dequeue the javascript file or something, the only thing I can think of that may be giving you trouble is somewhere in line #95 of the plugin file:

    /* Load scripts and css */
    		if ( is_active_widget( false, false, $this->id_base ) ) {
    			add_action( 'wp_enqueue_scripts', array('Popular_Posts_Tabbed_Widget_Jetpack','enqueueAssets' ) );
    			//setup action to handle ajax call
    			add_action( 'wp_ajax_pptwj_tabwidget_list', array( 'Popular_Posts_Tabbed_Widget_Jetpack', 'ajaxProcessor') );
    			add_action( 'wp_ajax_nopriv_pptwj_tabwidget_list', array( 'Popular_Posts_Tabbed_Widget_Jetpack', 'ajaxProcessor' ) );
    		}

    maybe it’s not falling through the call to is_active_widget() or something. I dunno.

    Also, I noticed the post-tiles plugin is also loading jquery 1.7.1 while wp is loading jquery 1.10.2

    just saying..

    hmm I faintly remember working on kicking js or queries out of the head to increase speed. would the code below affect anything? I deleted it from my php.ini and htacess files but nothing happened so I doubt they do:

    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 2 days"
    </IfModule>
    ## EXPIRES CACHING ##
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    another thing I wonder it may be is my deferred functions.js file in my wp-content folder:

    <script type="text/javascript">
    
     // Add a script element as a child of the body
     function downloadJSAtOnload() {
     var element = document.createElement("script");
     element.src = "deferredfunctions.js";
     document.body.appendChild(element);
     }
    
     // Check for browser support of event handling capability
     if (window.addEventListener)
     window.addEventListener("load", downloadJSAtOnload, false);
     else if (window.attachEvent)
     window.attachEvent("onload", downloadJSAtOnload);
     else window.onload = downloadJSAtOnload;
    
    </script>

    I do not know of any other surviving code due to the fact that I have upgraded the theme which erased my modifications. all that’s left that I recall is what I have pasted above. do you know of a fix for this? Only thing I can think of is that it’s a theme issue and that I must contact my theme support

    Plugin Author Ryann Micua

    (@pogidude)

    I really have no idea. but as for loading the js file, that condition check is to see if the widget is active on the page and if it is, then the js file is enqueued.

    that code you pasted is exactly as it is in my plugin file

    Ryann,

    What is interesting is that I have discovered that this is only occurring on my home page. I added the plugin to my widgets sidebar for post pages and it’s working. Take a look:

    http://hiphopspeakeasy.com/2014/02/dag-savage-ej-album-review/

    Any ideas?

    By the way, on the home page, it’s actually set up through a plugin called Page Builder by Site Origin.

    Wonder if this helps.

    Plugin Author Ryann Micua

    (@pogidude)

    Then, I think the issue is that Page Builder isn’t picking up on the is_active_widget() condition or something?

    anyway, you could just try to enqueue the js file globally. In your functions.php file add something like this:

    add_action( 'wp_enqueue_scripts', 'load_pptwj_script' );
    function load_pptwj_script(){
       if(is_front_page() || class_exists('Popular_Posts_Tabbed_Widget_Jetpack')){
          $widgetUrl = Popular_Posts_Tabbed_Widget_Jetpack::getWidgetUrl();
          wp_enqueue_script('pptwj-widget-tab-js', $widgetUrl . 'tab.js', array( 'jquery' ) );
          wp_enqueue_style( 'pptwj-widget-tab-css', $widgetUrl . 'tab.css' );
    
          $js_vars = array( 'ajaxUrl' => admin_url( 'admin-ajax.php' ) );
    
          wp_localize_script( 'pptwj-widget-tab-js', 'PPTWJ', $js_vars );
       }
    
    }

    oh yeah, word of warning, I haven’t tested that code so make sure you can get your site back just in case I have a typo in there somewhere 😀 but basically, it should load the needed files for you.

    If it doesn’t work, try removing the is_front_page() condition. other than that, I have can’t think of anything else.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Bullets showing’ is closed to new replies.