Picasa Larger Image Gallery Issue
-
Basically, I have tried to change the link for larger images from PhotoSwipe (default) to both thickbox from plugin and from wordpress with zero effect.
Nothing changes even after I delete shortcode and follow the steps again to re-enter the gallery.
The reason I wish to change it is because the link I am getting does not allow the user to scroll through images, nor does it show any kind of title or description as well as to exit requires the user to press the backspace key when I would prefer the user to be able to exit via the escape key AND possibly the backspace key AND possibly an exit button.
What am I doing wrong, please help!
Many thanks
-
I have just tested the PhotoSwipe on another theme and it works completely fine AND offers all the functionality I would like.
Any ideas why this might not be working because of a specific theme?
I know that both the PhotoSwipe and Thickbox libraries require the use of jQuery. Perhaps the theme you’re using makes use of a conflicting version of jQuery, or anther javascript library that conflicts with jQuery.
But because this is a theme issue and not a plugin issue, I’m not sure how much help I can be.
You could post the theme name and perhaps someone would be able to help, and/or if you happen to discover the problem and there is something I can do in the plugin to help, let me know.
Hi thanks for your response.
The theme does not do anything technical, it doesnt even have a slider. Maybe it does not have jQuery libraries at all.
The theme can be downloaded for free here:
https://genericwpthemes.com/theme/best-wedding-dress.htmlIs there an easy way to add these jQuery and JavaScript libraries?
I have tested the plugin on a theme what uses all the same plugins I have used on this site but has a slider which uses jQuery so it seems to me the source of the problem is almost certainly a lack of these libraries you mention.
Ah, my guess is the theme is not including the wp_head() function call.
Add the following line to the header.php of the theme before the </head> tag:
<?php wp_head(); ?>
no joy,
It was already included and I added it a second time to no avail.
<?php if (wp_loaded() === true) { ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> <head profile="https://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" /> <title><?php wp_title( '|', true, 'right' ); bloginfo( 'name' ); ?></title> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>" type="text/css" media="screen" /> <!--[if IE 6]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie6.css" type="text/css" media="screen" /><![endif]--> <!--[if IE 7]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie7.css" type="text/css" media="screen" /><![endif]--> <link rel="shortcut icon" type="image/x-icon" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico" /> <link rel="shortcut icon" type="image/png" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.png" /> <?php if(WP_VERSION < 3.0): ?> <link rel="alternate" type="application/rss+xml" title="<?php printf(__('%s RSS Feed', THEME_NS), get_bloginfo('name')); ?>" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="<?php printf(__('%s Atom Feed', THEME_NS), get_bloginfo('name')); ?>" href="<?php bloginfo('atom_url'); ?>" /> <?php endif; ?> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <?php remove_action('wp_head', 'wp_generator'); wp_enqueue_script('jquery'); if ( is_singular() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } wp_head(); ?> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/script.js"></script> </head><?php } ?> <body <?php if(function_exists('body_class')) body_class(); ?>> <div id="art-main"> <div class="cleared reset-box"></div> <div class="art-nav"> <div class="art-nav-l"></div> <div class="art-nav-r"></div> <div class="art-nav-outer"> <div class="art-nav-wrapper"> <div class="art-nav-inner"> <?php echo theme_get_menu(array( 'source' => theme_get_option('theme_menu_source'), 'depth' => theme_get_option('theme_menu_depth'), 'menu' => 'primary-menu', 'class' => 'art-hmenu' ) ); ?> </div> </div> </div> </div> <div class="cleared reset-box"></div> <div class="art-sheet"> <div class="art-sheet-body"> <div class="art-header"> <div class="art-logo"> <?php if(theme_get_option('theme_header_show_headline')): ?> <h1 class="art-logo-name"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1> <?php endif; ?> <?php if(theme_get_option('theme_header_show_slogan')): ?> <h2 class="art-logo-text"><?php bloginfo('description'); ?></h2> <?php endif; ?> </div> </div> <div class="cleared reset-box"></div>
The only other thing that I can think of would be either javascript conflicts, or a javascript error caused by the theme.
If a javascript error is thrown during the page load, my guess is that the javascript that follows it (including what is required to setup photoswipe / thickbox) wouldn’t execute, therefore the image links would simply open as the plain image instead of the photoswipe/thickbox overlay.
Do you see any indication of a script error when loading the page? If so, see if you can track down what script is throwing it. If you can correct the problem, or comment that script out temporarily, you may see the overlay begin to work.
Hi while searching for the source of the problem I found that the functions.php file throws a syntax error in the code below. Obviously it would be pretty impossible to search through it all to find the mistake, especially considering I don’t even know what it is. But if it is a JavaScript or jQuery library could I not find the original from the jQuery website or whatever and paste the good code directly over it?
The code is too big but here is just a snippet which may give you an idea of what it is…
[ Moderator note: code redacted ]
I found that the functions.php file throws a syntax error in the code below.
Where did you get that theme? That obfuscated code would never be allowed in the WordPress theme repo here. Either the theme author is (possibly) doing something dirty or your site may have been hacked.
It was from genericwpthemes or something like that… The site is not live yet so hacking is unlikely. What exactly does the code do? and why is it bad?
Oh. One of those themes. (You can probably hear the distaste in my voice…)
It could be a javascript conflict but themes from that provider are E-V-I-L, not GPL compatible, not supported here, and did I mention they’re E-V-I-L?
The reason they’re considered Not Good™ is because they obscure code in their themes to prevent you (the user) from editing their work. It also makes troubleshooting a possible js conflict like yours impossible.
Lose that theme and avoid them like a bad infection. That’s what they are. It may not have anything to do with this problem of yours but if it does then you’ll wont get it sorted out.
Thanks for the heads up, but I have done too much work to throw it away but I will be certainly avoiding it in the future.
… and still determined to find this problem. But now you have removed the code with the problem… and THAT is making finding the problem impossible.
Is it at least a JS library or jQuery library? so I can replace it with a new, error free version?
… and still determined to find this problem. But now you have removed the code with the problem… and THAT is making finding the problem impossible.
Sorry but we do not permit obfuscated code here and your case is no exception. Code like that get’s deleted whenever found.
The theme authors obscured that code for their own reasons. They’re wrong to do so but it’s not for us here to work around the theme author’s intentions.
You can either switch to a theme that is supported here or contact that theme provider for support.
Now before you get into it here have you tried basic troubleshooting to confirm that it is in fact your theme?
I have just tested the PhotoSwipe on another theme and it works completely fine AND offers all the functionality I would like.
It’s not 100% clear to me (lack of coffee) but if you can deactivate all of your plugins except the “Picasa and Google Plus Express”, switch to the Twenty Twelve theme, and clear your browser cache and cookies?
If the problem goes away then reactivate your theme and just that theme. If the problem comes back then it’s confirmed that it’s the theme. You’ll need to take it up with the theme author if that’s the case.
Yes it is definitely the theme
Paul – if your theme includes the wp_head() function call (which you showed me it did), then this plugin will include all of the libraries that it needs, and that function will add them to your site.
So the problem is not that the required libraries are not there, the problem is that the theme you’re using is somehow conflicting with them. Or, and perhaps more likely, your theme is throwing some sort of JavaScript error prior to the photoswipe logic running, which would prevent any of the photoswipe logic from executing.
Like Jan said, you’ll probably need to either contact the theme developers and report the problem, or select a different theme.
- The topic ‘Picasa Larger Image Gallery Issue’ is closed to new replies.