Support Forum
Hi all,
I bet that this topic has been discussed but I was not able to find it, in forum or codex, so ask here.
The page title formed by the forum is really terrible and I explain why.
The structure is inverse from forum's breadcrumbs, starting from the last to main title: topic | (page) | Forum | (optionally) Group | and this path is used to form the page title, that it's shown by page breadcrumbs too.
I attach a screen of this forum as it's the same thing that happens on mine.
In number ( 1 ) part there is the page breadcrumb/title and in ( 2 ) is the forum breadcrumb (correct).
I know that I can hide totally the page title in forum admin but, apart that in my theme it create a mess with the theme menu, I'd like to have a page title "topic tile" without page, forum or whatever or, at least, have the correct path from parent to childs.
How can I achieve this? I digged within forum theme but could not be able to find it, could you point me in the right direction?
Thanks in advance.
Marco
Hakuna Matata
#1 is not put there by the forum... its done by the wp theme... you can change the wp theme to output whatever you want... it is typically done by page.php template file.. just make your own wp theme template file..
Visit Cruise Talk Central and Mr Papa's World
Hi Mr Papa,
I was in page.php and you are right, the page title function is called there but seems to me that it takes the page title, this is the code:
<h2 class="title"><?php the_title(); ?></problem-with-post-edit-button2>
I believe that the first part creates the breadcrumb and the second part, showns the page title, am I in error? If I disable the page title, in forum admin, it disappears from both locations.
What do you think about?
Hakuna Matata
yes, that wp theme code will output your blog title » wp page title...
what do you want it to be?
Visit Cruise Talk Central and Mr Papa's World
that is fine on topic view... but what about on the main group view page or a forum view page?
Visit Cruise Talk Central and Mr Papa's World
Ideally I'd like to see only the last ring of the chain:
if I'm in "How to change the page title? | Simple:Press 5 General Topics | Support Forum"
I'd like to see "How to change the page title?"
if I'm in "Simple:Press 5 General Topics | Support Forum"
I'd like to see "Simple:Press 5 General Topics"
and, of course, if I'm in "Support Forum" see only this.
Or, at least, how to invert positions from:
"How to change the page title? | Simple:Press 5 General Topics | Support Forum"
to: "Support Forum | Simple:Press 5 General Topics | How to change the page title? ! Page x" ?
Hakuna Matata
the page title is optimized for best seo... putting the site first, will cause seo issues for you because all pages will start with a duplicate wording... Getting the topic title out there first, is important for seo...
the breadcrumbs are organized differently because they are for reading rather than getting your site the best search engine results...
well, you will need to write a little piece of php code then... where you check for page type and output something... there is nothing built in to do that... something like:
global $sfvars; if ($sfvars['pageview'] == 'forum') { global $spThisForum; echo $spThisForum->forum_name; } else if ($sfvars['pageview'] == 'topic') { echo $spThisTopic->topic_name; } else { the_title(); }
but completely untested...
Visit Cruise Talk Central and Mr Papa's World
Well, I'm not so tech savy so I tried to put your code here and there, without results
After I tried to build a function, inserting it in function.php and call it at place of the_title();
this is the code:
function spforum_page_title() { global $sfvars; if ($sfvars['pageview'] == 'forum') { global $spThisForum; echo $spThisForum->forum_name; } else if ($sfvars['pageview'] == 'topic') { echo $spThisTopic->topic_name; } else { the_title(); } }
and after I called it from the page template: <h2 class="title"><?php spforum_page_title(); ?></problem-with-post-edit-button2>
and nothing works
I wrong so much?
Hakuna Matata
1 Guest(s)