Forums

easy fancybox does nothing on other pages (8 posts)

  1. javildesign
    Member
    Posted 10 months ago #

    Hi all,

    On http://www.javildesign.com/ my 'teaser' thumbnail fancybox popup works great.
    Problem is that the same post archived, is not showing up as fancybox popup.. -> http://www.javildesign.com/category/artwork-2011/

    I checked the 'page source' and both pages are showing fancybox loaded and the thumbnail in fancybox link brackets, so does anyone knows where to look to solve this issue?

    Thanks!

  2. RavanH
    Member
    Posted 10 months ago #

    It's two problems actually:
    1. your theme loads an old (included) version of the jQuery library
    2. the plugin in-over-your-archives trows an Uncaught Exception error, preventing other jQuery script to run.

    Removing the plugin In Over Your Archives will allow FancyBox to run but it does not solve the double loading of jQuery. Which in turn might be causing the error after all.

    Tip: see http://wordpress.org/extend/plugins/easy-fancybox/faq/ to get NextGEN Gallery and Easy FancyBox working nicely together without loading redundant gallery scripts like ngg.slideshow.js...

  3. javildesign
    Member
    Posted 10 months ago #

    Thank you.

    First I need to update the included version.

    I deactivated the 'in-over-your-archives' plugin, so my Fancybox will don't have issues anymore. But now I don't have thumbnails anymore, on the archived posts.. I was searching for a plugin or other solution, but I can't find a proper solution..
    Do I need to search for a solution in the nextgen options?

  4. RavanH
    Member
    Posted 10 months ago #

    Updating the included jQuery script in your theme will not solve the issue of double loading it. How does your theme tell WordPress to add the link to the jQuery library in the head section? Does it use wp_enqueue_script() in its functions.php or is it hard-coded in header.php?

    About "In Over Your Archives": do you know if the Uncaught Exception error occurs on archive pages when Easy FancyBox is deactivated? It would be worthwhile to find the root of the issue.

    Changing NextGEN options will prevent loading some scripts that you do not need anyway (when using Fancybox). It would be surprising if the problem originates from that particular gallery script, but it is worth trying :)

  5. javildesign
    Member
    Posted 10 months ago #

    About the jQuery library, it is in the functions.php:

    if ( !is_admin() ) { // instruction to only load if it is not the admin area
       // enqueue the script
    
    	wp_enqueue_script('p2h_jquey',
    	get_bloginfo('template_directory') . '/includes/js/jquery-1.3.2.min.js' );
    
    	wp_enqueue_script('p2h_cufon',
    	get_bloginfo('template_directory') . '/includes/js/cufon-yui.js', '1.0' );
    
    	wp_enqueue_script('p2h_cufons',
    	get_bloginfo('template_directory') . '/includes/js/cufon-customizations.js', '1.0' );
    
    	wp_enqueue_script('p2h_cycle',
    	get_bloginfo('template_directory') . '/includes/js/jquery.cycle.all.min.js' );
    
    	wp_enqueue_script('p2h_jquery-ui',
    	get_bloginfo('template_directory') . '/includes/js/jquery-ui-1.7.2.custom.min.js' );
    
    	wp_enqueue_script('p2h_superfish',
    	get_bloginfo('template_directory') . '/includes/js/superfish.js', '1.0' );
    
    	wp_enqueue_script('p2h_vegur',
    	get_bloginfo('template_directory') . '/includes/js/Vegur.font.js', '1.0' );
    
    	wp_enqueue_script('p2h_gnuolane',
    	get_bloginfo('template_directory') . '/includes/js/Gnuolane.font.js', '1.0' );
    
    	wp_enqueue_script('p2h_superfishs',
    	get_bloginfo('template_directory') . '/includes/js/superfishs.js', '1.0' );
    }

    About the Uncaught Exception error, how can I check this error? You discovered it, how do you see this error and where do you see it?

  6. RavanH
    Member
    Posted 10 months ago #

    To make your theme use the WP included jQuery library, change the first part there from

    wp_enqueue_script('p2h_jquey',
    	get_bloginfo('template_directory') . '/includes/js/jquery-1.3.2.min.js' );

    simply to

    wp_enqueue_script( 'jquery' );

    Further down there is the jquery-ui extension loaded which has also a newer version available included with WP. But it looks like the theme uses a customized version. No idea why it uses a edited version but it might break something when you switch to the WP included version...

    To see javascript errors (better than by clicking that yellow exclamation mark icon that sometimes appears in IE's bottom corner) you need to install a developer toolbar plugin in your browser. It depends on the browser you are using. If you use Google Chrome or Opera, there is already a developer tool backed in. Right-click anywhere on the web page and choose Inspect Element. Then open the Console or Errors tab to see javascript errors occurring on that page.

  7. javildesign
    Member
    Posted 10 months ago #

    I did what you told.

    Eventually, I decided to disable the in-over-your-archives plugin.

    But, I really want to have thumnails in my blog!! But how?? I'm searching for this for days now, and I'm getting stucker by the minute!

    I have tried this: [added in my functions.php]

    // Enable Post Thumbnail Images
    
    //* Thumbnails on category, archive and search pages *//
    function my_post_title($title) {
    	if (is_category()) {
    		return get_the_post_thumbnail(NULL, 'thumbnail') . $title;
    	} elseif (is_archive()) {
    		return get_the_post_thumbnail(NULL, 'thumbnail') . $title;
    	} elseif (is_search()) {
    		return get_the_post_thumbnail(NULL, 'thumbnail') . $title;
    	}
    	else {
    		return $title;
    	}
    
    }

    But it does not work for my theme..

    Still want to help me to get me thumbnails in my blog?
    Thanks!

    ps: why is this not already default??

  8. RavanH
    Member
    Posted 10 months ago #

    There seem two things missing:

    add_theme_support( 'post-thumbnails' );

    and

    add_filter('the_title','my_post_title');

    Make sure these are in your functions.php too...

Reply

You must log in to post.

About this Topic