Support Forum
Hi,
Purchased a support pack specifically to help fix this bug.
I am unable to have dynamic/ meaningul <title> tags in my forum pages.
In Simple Press SEO options I activated:
- Overwrite page/browser title with ours
- Include page name in page/browser title
- Include topic name in page/browser title
For for every single forum page I always have: Forum | website | website
My theme manages title tag writing:
<title><?php yit_title() ?></title>
But I tried disabling this in my theme for the forum pages like so:
$page_slug = get_page_template_slug($post_id);
if ($page_slug == 'forum-template.php') "do nothing"
Please note that the SEO Metatags setup works with the following option:
Here's a screenshot of my full SEO settings. I do not use a SEO plugin on my site.
Using Reboot theme.
Updated all to current version.
If you are familiar with WordPress filters - add_filter() and apply_filter() - then you will also probably know that this is how a WP theme or a plugin can modify and replace content. This is the only tool available to a WP theme or plugin developer.
This can obviously lead to conflict if more than one apply_filter() is being used and my guess is that your WP theme is doing just that. And - depending on what it is modifying the default WP title to - then the forum call can quite clearly fail to make further modifications.
I do not really follow your code example - i.e., what is 'forum-template.php'? There is no such file. And it would never match a page slug. There are better ways. The problem here however, is that depending on where you try and modify the title code, it may well be too late as that code and any third party filters, will already have been evaluated and determined.
I think what you need to do first is simply and temporarily comment out the call to the title in your WordPress theme to initially determine if that is the cause of the conflict. Once that is established it may be possible to devise a strategy. I would comment it out - clear your browser cache - and see what happens.
YELLOW
SWORDFISH
|
Hi,
Thanks for your answer.
My code does exactly that: it skips the theme completely. The Theme uses <title><?php yit_title() ?></title> to insert the title.
And this code:
$page_slug = get_page_template_slug($post_id);
if ($page_slug == ‘forum-template.php’) “do nothing”
Skips the yit_title() function.
There no longer is a <title> tag in my page after this. Not the theme and not the Simple Press.
As for $page_slug it's defined my get_page_template_slug($post_id); and returns for the forum "forum-template.php". There might be other ways of doing this, but this one works.
for the forum title meta tag to be set (dynamically or not), we rely on the standard wp filter 'the_title' to be called... its how plugins can hook into the title generation...
this is typically done one of two ways depending on theme age... it can be direct call to wp_title() in the theme or via wp_head() call if the theme supports 'title-tag'...
so you could try adding one of those to your custom theme template for the forum page...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)