- This topic has 14 replies, 2 voices, and was last updated 7 years, 6 months ago by Tom.
-
AuthorPosts
-
September 2, 2016 at 8:58 am #223312Ray Toler
Love the GP theme and have been using it for some time now. I also use the very old “Tagline Rotator” plugin (http://neverblog.net/tagline-rotator-plugin-for-wordpress/) to randomize the site description.
After a recent GP update, the site description is only showing the default from WordPress. The page title tags in the header are correctly rotating, but the description in the page body is not.
Ordinarily, I would suspect that the plug had finally broken since it hasn’t been updated for many years. However, I tested with several other themes (e.g., twenty-eleven, twenty-twelve, etc.) and the plug works correctly in all of them, which leads me to think it was something that changed in GP. I have a screenshot from August 11 that shows it working correctly.
The site in question is raytoler.com and my “default” description is “Adumbrating the elephant.”
If someone can point me to the right place to learn how to fix this, I’m more than happy to dig in and roll up my sleeves. I’m sure it’s something relatively simple, but I don’t have enough WordPress knowledge to know where to start.
September 2, 2016 at 9:24 am #223319TomLead DeveloperLead DeveloperHi there,
Any chance you can link me to your site so I can take a look?
Thanks!
September 2, 2016 at 1:53 pm #223400Ray TolerHi, Tom – sorry – I neglected to make it a live link in my original post.
September 2, 2016 at 11:13 pm #223460TomLead DeveloperLead DeveloperSorry about that – didn’t see the link.
I’m not really seeing anything broken – is the plugin still active?
September 3, 2016 at 7:20 am #223510Ray TolerHi Tom,
Yes, the plugin is running. The
<title>
HTML section description/tagline changes with every page refresh as expected. The page Heading section, though, only displays “Adumbrating the Elephant” which is the default site description entered in the WordPress configuration.When I select other themes, (I used twenty eleven through twenty fifteen to test), the description changes with each refresh on the page body as well. I’ve also tested this in Chrome, Safari, and Firefox with the same results in each.
If you’re seeing random site descriptions in the page heading, then it is working correctly and there’s something wrong with my machines, but if it’s just “Adumbrating the Elephant,” then you’re seeing the broken behavior.
I know this is a trivial thing, but it was working just a couple of weeks ago and I was puzzled why it stopped. I suspect a *very* minor tweak to the GP code that generates the page header, but I haven’t been able to track down where everything is happening yet. I haven’t been a coder for almost 20 years. π
September 3, 2016 at 7:27 am #223515Ray TolerIn case it helps, here are the pertinent codes sections from three refreshes of the page that I just did:
Page Load 1
<head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="http://www.raytoler.com/xmlrpc.php"> <title>Ray Toler – TANSTAAFL!</title> <link rel='dns-prefetch' href='//s0.wp.com'>
<div class="inside-header grid-container grid-parent"> <div class="site-branding"> <p class="main-title" itemprop="headline"><a href="http://www.raytoler.com/" title="Ray Toler" rel="home">Ray Toler</a></p> <p class="site-description">Adumbrating the elephant.</p>
Page Load 2
<head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="http://www.raytoler.com/xmlrpc.php"> <title>Ray Toler – It’s all fun and games until someone gets their eye poked out.</title>
<div class="inside-header grid-container grid-parent"> <div class="site-branding"> <p class="main-title" itemprop="headline"><a href="http://www.raytoler.com/" title="Ray Toler" rel="home">Ray Toler</a></p> <p class="site-description">Adumbrating the elephant.</p>
Page Load 3
<head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="http://www.raytoler.com/xmlrpc.php"> <title>Ray Toler – Nothing is worse than having an itch you can never scratch!</title>
<div class="inside-header grid-container grid-parent"> <div class="site-branding"> <p class="main-title" itemprop="headline"><a href="http://www.raytoler.com/" title="Ray Toler" rel="home">Ray Toler</a></p> <p class="site-description">Adumbrating the elephant.</p>
September 3, 2016 at 9:43 pm #223605TomLead DeveloperLead DeveloperSorry for not getting back to you sooner – had my hard drive crash this morning, so I spent most of the day re-building..everything.
Any chance you can test this using the TwentySixteen theme?
The title tag is handled by WordPress itself now, which could be why this isn’t working (there’s no
<title>
tag in the theme).Let me know π
September 4, 2016 at 12:51 pm #223818Ray TolerHi Tom,
No trouble at all and I appreciate the help – especially on a weekend! π I deleted and reinstalled Generate Press Premium, and while it fixed some other issues (e.g., “Sections” had disappeared from configuration options but is now back), the tagline rotator still wasn’t working.
I activated the twenty-sixteen theme and the tagline rotator works correctly. The element that’s not working in GP is the tagline/site-description. Here’s the code snippet from when the 2016 theme was active:
<div id="page" class="site"> <div class="site-inner"> <a class="skip-link screen-reader-text" href="#content">Skip to content</a> <header id="masthead" class="site-header" role="banner"> <div class="site-header-main"> <div class="site-branding"> <h1 class="site-title"><a href="http://www.raytoler.com/" rel="home">Ray Toler</a></h1> <p class="site-description">Live from a van down by the river.</p> </div><!-- .site-branding --> <button id="menu-toggle" class="menu-toggle">Menu</button> <div id="site-header-menu" class="site-header-menu"> <nav id="site-navigation" class="main-navigation" role="navigation" aria-label="Primary Menu">
Here’s the same area when I reactivated GP:
<div class="inside-header grid-container grid-parent"> <div class="site-branding"> <p class="main-title" itemprop="headline"><a href="http://www.raytoler.com/" title="Ray Toler" rel="home">Ray Toler</a></p> <p class="site-description">Adumbrating the elephant.</p> </div>
Anything else I can try?
September 4, 2016 at 11:37 pm #223895TomLead DeveloperLead DeveloperI’m not really sure what’s going on then.
TwentySixteen and GP use the same function to display the tagline:
get_bloginfo( 'description', 'display' )
The only thing I can think of is maybe the plugin is looking for this code in the header.php, assuming that it’s not being hooked in.
In GP’s case, it is being hooked so we have more control over where and when it displays.
September 5, 2016 at 7:51 am #223979Ray TolerOk, thanks very much, Tom. My best guess at this point is that something broke when WP 4.6 came out a couple of weeks ago since everything was working prior to that. What’s puzzling to me is that it’s working correctly in the HEAD section (setting the page title) but not the BODY.
I’ll try to dig through the various code. Probably time I learn more about PHP and WordPress anyway (the vocabulary and where things live are normally my biggest hurdles). If I figure anything out, I’ll post my solution to this thread.
September 5, 2016 at 9:56 am #224005TomLead DeveloperLead DeveloperIf you wanted to try, you could take the contents of the generate_construct_site_title() function in “inc/template-tags.php” and add it to the header.php file (in a child theme), replacing the generate_header_items() function.
However, that plugin is OLD – it might be time to try to find an alternative?
September 5, 2016 at 12:07 pm #224035Ray TolerDefinitely old, so I knew I was on borrowed time with it – it just kept working. The only thing that threw me was that it’s only when I use GP that it doesn’t function correctly. I think you’re right, though. Time to find a replacement.
September 5, 2016 at 10:42 pm #224131TomLead DeveloperLead DeveloperIt might be worth trying the header.php thing, but let me know if you find a replacement or not π
September 22, 2016 at 1:21 pm #228743Ray TolerTom,
I had a business trip and had to set this aside. The fix ended up being very simple. It’s not a bug, technically, but simply an omission of an argument in the /inc/template-tags.php file.
I changed line 604 from:
<p class="site-description"><?php echo html_entity_decode( get_bloginfo( 'description' ) ); ?></p>
to
<p class="site-description"><?php echo html_entity_decode( get_bloginfo( 'description', 'display' ) ); ?></p>
and everything started working again. I think it was just an omission of the ‘display’ bit. That was included on all of the other templates I tested, and was also how your site title is configured in line 600.
So all is working again. If this is an inappropriate fix, would you please let me know why? I’m learning (slowly) and would appreciate the explanation and education.
Thanks for all of your help!
September 22, 2016 at 10:37 pm #228818TomLead DeveloperLead DeveloperI’ve just made that change for the next version.
Thanks! π
-
AuthorPosts
- You must be logged in to reply to this topic.