slash83
Forum Replies Created
-
Jeremy,
Let me thank you so much. You truly are a Happiness Engineer ?? Thanks for bearing with me in this long struggle. Finally, you managed to find the error and this makes me really happy. The WordPress support is really amazing. Will stick with WP and support it in the future!
Cheers,
Marcel
Done.
Cheers!
fyi:
disabled the follow this blog widget in the footer. the like button is still not working though…
Thank YOU for bearing with me, Jeremy.
Unfortunately, disabling the lazyload jQuery didn’t do the trick. The gallery wouldn’t work afterwards and the wordpress like button was still greyed-out. (I tried different browser).
Could the “Follow this Blog” widget be a problem? I will have a look if I can remove it and what the effects on the like button are …
just to let you know: I did another round of disabling Jetpack, disabling all plug-ins, changing back to the twenty-twelve theme. Re-enabled Jetpack. (Like button worked). Changed to my current theme (Button stopped working). Re-enabled all plug-ins. Status quo: Button doesn’t load.
Thanks, my code now looks like this:
<?php wp_enqueue_script('jquery'); if ( is_singular( 'portfolio' ) ) wp_enqueue_script('slideshow', get_template_directory_uri() . '/js/jquery.cycle.all.min.js', 'jquery', false); wp_enqueue_script('lazyload', get_template_directory_uri() . '/js/jquery.lazyload.mini.js', 'jquery', false); wp_enqueue_script('script', get_template_directory_uri() . '/js/script.js', 'jquery', false); ?> <?php wp_head(); ?> <?php if ( is_singular( 'portfolio' ) ) : ?> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#show').after('<div id="show_nav">').cycle({ fx: 'fade', speed: 500, next: '#show', timeout: 0, pager: '#show_nav' }); }); </script> <?php endif; ?>
GOOD NEWS: My gallery is still working! Thanks!
BAD NEWS: The jetpack button is still stuck “loading..”
I also disabled the twitter json call for the moment, so now there is no error on my page when I use Firebug. Not sure how to get the like button to work though..
Thanks Jeremy,
I did that. Unfortunately, it brakes my photo galleries, the jQuery Cycle doesn’t work anymore.
Firebug: “TypeError: jQuery(…).after(…).cycle is not a function
pager: ‘#show_nav'”
It also doesn’t make the like button work. Still greyed out and “loading”.
I am not sure how the template is built, never saw this portfolio option in another template before. Therefore I am not sure if it is a page or a post or something different.
In the jetpack option I see the following options:
“Show buttons on
Front Page, Archive Pages, and Search Results
Posts
Pages
Media
Portfolio”Could this mean that “Portfolio” is something completely different than a post or page?
https://www.marcelmuench.de/portfolio/myanmar/
This and any other picture gallery that you can find from the main page https://www.marcelmuench.de/
Thanks!
You’re right, there is no need for a gallery in the articles pages!
I left the code (as pasted in here) unchanged, since otherwise it breaks the galleries of the portfolio pages. I also find it confusing that the code should indicate that the slideshow only appears on article pages, whereas the opposite is the case. However, I can’t fully get a grasp of how the developer built the theme.
Thanks Jeremy!
I looked at my code and cleaned it up a bit. It was a bit messy indeed. However, I did not manage to work in your suggestion – it would break my jQuery gallery, but this might be a problem of my limited coding skills.
Here is my header.php which calls the jQuery libraries.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="https://www.w3.org/1999/xhtml" dir="<?php bloginfo('text_direction'); ?>" xml:lang="<?php bloginfo('language'); ?>"> <head> <!-- in --!> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1"><![endif]--> <!--[if IE 6]> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie6.css" type="text/css" media="screen" /> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie7.css" type="text/css" media="screen" /> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/ie8.css" type="text/css" media="screen" /> <![endif]--> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" /> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <?php wp_head(); ?> <script src="<?php bloginfo('template_url'); ?>/js/columnizer.js" type="text/javascript"></script> <script src="<?php bloginfo('template_url'); ?>/js/columnize.js" type="text/javascript"></script> <script type='text/javascript' src='<?php bloginfo('template_url'); ?>/js/menu.js'></script> <!-- out --!> <style type="text/css"> #images { height: 300px; width: 900px; padding:0; margin:0; overflow: hidden;} #images img { border:none;} </style> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title><?php global $page, $paged; wp_title('|', true, 'right'); $site_description = get_bloginfo('description', 'display'); if ( $site_description && ( is_home() || is_front_page())) echo " | $site_description"; if ($paged >= 2 || $page >= 2) echo ' | ' . sprintf( __('Page %s'), max($paged, $page)); ?></title> <meta http-equiv="Content-language" content="<?php bloginfo('language'); ?>" /> <link rel="profile" href="https://gmpg.org/xfn/11" /> <link href="https://www.marcelmuench.de/favicon.ico" rel="shortcut icon" /> <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> <!--[if IE]><link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('template_url'); ?>/ie.css" /><![endif]--> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>"/> <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" /> <?php wp_enqueue_script('jquery'); if ( is_singular() ) wp_enqueue_script('slideshow', get_template_directory_uri() . '/js/jquery.cycle.all.min.js', 'jquery', false); wp_enqueue_script('lazyload', get_template_directory_uri() . '/js/jquery.lazyload.mini.js', 'jquery', false); wp_enqueue_script('script', get_template_directory_uri() . '/js/script.js', 'jquery', false); ?> <?php wp_head(); ?> <?php if ( is_singular() ) : ?> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#show').after('<div id="show_nav">').cycle({ fx: 'fade', speed: 500, next: '#show', timeout: 0, pager: '#show_nav' }); }); </script> <?php endif; ?> </head> <body> <div class="wrapper"> <div class="header clear"> <h1 class="logo"><a href="<?php bloginfo('home'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.jpg" alt="<?php bloginfo('name'); ?>" /></a> </h1> <?php wp_nav_menu(array('menu' => 'Header', 'theme_location' => 'Header', 'depth' => 2, 'container' => false, 'menu_class' => 'nav jsddm', 'walker' => new extended_walker())); ?> </div> <div class="middle clear">
When I put the !is_single() conditional tag instead of ‘if ( is_singular() )’ the jQuery gallery stopped working. How to do it correctly?
Thanks!
Thanks Jeremey,
the Twitter widget is something which I added to my customised version of the theme.
The original WPShower Portfolium theme does not include a Twitter (or other) widget. As mentioned before, even if I go back to this original theme, the Jetpack like button is not loading.
No worries. Appreciate your help!
Unfortunately that doesn’t help either. As I mentioned it works if I switch to another theme. It does not work with the original WPShower Portfolium theme as well as with my customised Portfolium theme.
Have you got any thoughts on the assumptions in my post today (6 hours ago). Thanks
Sorry Jeremy, if you scroll to the first post you will see, that I started this post and that an example of my page can be found at: https://www.marcelmuench.de/2013/04/responsible-business-week/ (as stated in my very first post).
Richard,
Thanks again. I did have a look at the troubleshooting.
The like button works when I switch to other themes. I still can not get it to work with my current theme.
I thought I might have messed up the code when I optimised the theme. However, I now also checked back with the original theme. I downloaded a fresh copy and activated it. It seems as it is a problem with the theme. You can have a look at the original theme here: https://wpshower.com/themes/portfolium/
I think the theme is quite a bit different because of its portfolio structure. Which means it offers a portfolio page for photography, and a blog separately. This is resembled in the admin dashboard. If I like to create a new post I simply add a new post. However, if I like to create a new photo set, I will have to do this via a tab called “portfolio”, which seems to be a separate functional element of the theme.
My guess is that this unique structure could be a problem for the jetpack plug-in. Most other functions (apart from the wordpress likes) seem to be working though.
In the theme’s support forums I couldn’t find a discussion related to Jetpack. Any thoughts, Richard?
Thanks!
Marcel
Hey Richard,
Thanks for staying tuned on this. Actually I have not removed the Jetpack Like button. I activated the plug-in again. When I visit my page it still shows the greyed-out button.
Unfortunately I can only do front-end editing. What I know from customising the page is that I do load a few jquery scripts and a columnizer writter in javascript. I could hand over the original template files if that might help you.
However I do understand if that might be too much effort for an individual problem.
Thanks for your help anyway!
Marcel