Support Forum
Hello
I'm on v 5.6.1 of Simple:Press and I've had a problem for a while that I can't figure out. After searching the forums here today I have narrowed it down a bit, but I'm still not sure what I need to change.
The issue is that the page title for the forum pages is getting overwritten to nothing. In Simple:Press, I have the option turned on in the components/SEO section - the weirder thing is that the page title actually appears while the page is loading, but then before it is done, it disappears - something is removing the page title. I also tinkered around with the page a bit and found out that if I remove this .js file, it works correctly:
sp-plugin-scripts-desktop-footer.js
I've disabled all my plugins, all the SP plugins to no effect. I then tried changing the theme to the default 2016 theme, and the problem seems to go away, so that points to a theme issue. I'm just not sure what I need to change in my current theme to fix this issue.
Can someone point me to what I need to modify in my theme to fix this issue? If it helps, I'm using the Aldehyde theme v 2.0.0.1 which is not that old.
Thanks much!
Rob
It might depend on what you mean by having had the problem 'for a while'.
With WordPress 4.4 there were some changes to the way the page title was being generated. I didn't work on this myself so I am not sure of all the facts but I do know that it left a problem in our 5.6.0 release and led to us quickly releasing a 5.6.1 as a fix.
So is it possible that your WordPress theme is suffering from a similar conflict with this new title method and failing? And the two things to note here are that (a) this could just affect the forum page because of the way we go on to modify it due to your SEO settings; and (b) removing the javascript file would just result in all scripts failing due to errors which could have any number of unknown and seemingly random consequences. If things work correctly with the WP twenty-sixteen theme then that makes the argument more likely.
My colleague who worked the fix for us might possibly be able to suggest where to look but is away for a few days. And all themes are, of course, different - sometimes very, very different! Have you talked to the theme author and checked if an update is available?
YELLOW
SWORDFISH
|
It has been a problem since long before wordpress 4.4, so I'm pretty sure it isn't that. I'm thinking (in hindsight here), it might have been when I upgraded to the v2 of the theme, but I can't be sure. Since the 2016 theme works correctly, that seems pretty definite that it is a theme issue. I played around with a few "title" things in the theme, but no changes in behavior.
It kind of looks like this is an "abandoned" theme. It is no longer on the author's website - it was a free theme. Maybe I should look for a new theme.
If anyone has any suggestions on how to fix this, I'd appreciate hearing them, otherwise I guess I am on the hunt for a new theme.
Thanks, and Merry Christmas!
The most basic way to display the title in WP themes is by using the
the_title()
function in the template - in this case the page.php template. You might want to start be seeing if that is called or, if nit, there is a references to displaying the title that could be investigated.
YELLOW
SWORDFISH
|
I haven't played with the wordpress templating system and find it very confusing (probably because I have no context at all for it). Anyway, I looked at the page.php file, and all I see in there is a call to get_header(), which I'm kind of assuming may be calling the header.php file - that is where all the head tags are. This is what was there:
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"><?php wp_head(); ?>
</head>
I tried to add this:
<title><?php the_title(); ?></title>
But then the title NEVER appeared in the forum pages (even when the page started loading). Other pages still worked fine.
I will continue to experiment a bit to see what I can come up with, but if you have any more suggestions, or even good tutorials on the WP templates, that would be fabulous. The theme is working very well otherwise, including being responsive (which is why I changed it to begin with). I'd love to figure this issue out.
One more thing I noticed - if I turn off all the SEO options for page titles in SP, I get similar behavior. The page title defaults to the "normal" WP title (Page Name - Blog Name), but then before the page completes loading, it removes the title.
I've also been comparing this theme to 2016 (which works fine), and thus far, they have been pretty similar in how they appear to handle the header stuff. Many places the code is identical.
You will not find the set up of the page title in the header code. It will be somewhere in the code spinning off of the page.php template.
I did have a thought however. Just check you have not turned off the title display in the forum admin > options > General Display Settings.
YELLOW
SWORDFISH
|
Yellow Swordfish said
I did have a thought however. Just check you have not turned off the title display in the forum admin > options > General Display Settings.
I checked this, and did have this disabled. I unchecked this option, but the behavior is the same, except now on the page itself it now displays the page title. The browser title is still blank no matter which way I toggle this setting. I will continue to explore this - the more I look, the more I'm determined to figure out what is causing this. It has to be something really stupid.
My apologies - I thought I was being clear - yes it is the page/browser title - the one that appears on that browser tab or the title bar of the browser. That is the one that appears correctly while the page is loading and then gets overlaid by something before the page completes loading.
When I do a view/source on the page, the title attribute is there as it should be, so some javascript has to be responsible for overriding it. Based on the behavior, that would make sense.
1 Guest(s)