• Resolved GiveMore.com

    (@givemorecom)


    The WordPress Popular Post Plugin is breaking my custom jQuery popup plugin causing it to throw a TypeError saying the jQuery plugin call is not a function.

    The error will only happen if…
    1. You are on a single post page (the error does not occur at the category level)
    2. You are not logged into the backend

    I am pretty sure the error is being caused by lines 694 – 700 of file wordpress-popular-post.php, but do not know how to correct it and would prefer not to edit the plugin code for the sake of update ability.

    <!-- WordPress Popular Posts v<?php echo $this->version; ?> -->
    <script type="text/javascript">
        /* <![CDATA[ */
    	jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>', {action: 'wpp_update', token: '<?php echo $nonce; ?>', id: <?php echo $id; ?>}, function(data){/*alert(data);*/});
        /* ]]> */
    </script>
    <!-- End WordPress Popular Posts v<?php echo $this->version; ?> -->

    The plugin looks to be working perfectly otherwise … it is just causing my jQuery plugin to break.

    Can someone please help?

    You can see a live example here: http://blog2.givemore.com/pickford-on-give-take/

    Thanks!
    Joe

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter GiveMore.com

    (@givemorecom)

    I changed the site directory and the example link is now at: http://www.givemore.com/blog/pickford-on-give-take/

    Anyone have any ideas how to help?

    Thread Starter GiveMore.com

    (@givemorecom)

    I solved it!

    The issue is that WordPress Popuplar Posts is importing jquery on line 683 using:

    wp_print_scripts('jquery');

    That was conflicting with my plugin because I already have jQuery importing in the head of every page.

    They were also two different versions of jQuery … The plugin(wordpress) imported version 1.7.2 and I manually have been importing version 1.8.

    Hope this helps someone out there.

    The WordPress Popular Posts developer Hector Cabrera should update his plugin to check it jQuery is already imported and if so not import.

    Thanks!
    Joe

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WordPress Popular Post] Plugin Causing jQuery Plugin Not To Work’ is closed to new replies.