no one is interested in seo??
yeah but I want to solve it without a plugin I’m sure that there is a function I’ve tried some it didnt work…
You need to look at the following:
https://codex.wordpress.org/Meta_Tags_in_WordPress
and the file bp-forums-templatetags.php in the bp-forums folder
You can then build your forum SEO tags, just the way you want, in your theme’s header.php file
@RogerCoathup thanks for help
I do have a file called bp-forums-templatetags.php in the bp forums folder?
I tried this here :
bp_get_the_topic_title() ?
it didnt worked???
You need to ask your question clearly and provide more information.
Where did you try the function call?
Use pastebin.com and post your code.
I’m using a child theme and I added this between title /title in header.php
You would need bp_the_topic_title() that function echos the result of bp_get_the_topic_title()
ok, I suspect that bp_get_the_topic_title() and the forum template tags can only be used inside the loop. Can anyone confirm this?
Instead, have a look at the functions in bp-forums.php and see if they will help you.
Alternatively, download the plugins that @modemlooper advised, and have a look at their code to see which functions they used
You can also look at the functions in bp-forums/bbpress/bb-includes/functions.bb-topics.php
Unless anyone else knows a quicker way, you are going to have to get your hands dirty coding this one.
Personally, I’d leave it until the new forums plugin comes out in beta in mid September.
thanks will try something
about which new forum plugin are you speaking?
http://wpmu.org/big-news-for-bbpress-users-a-bbpress-plugin-is-coming-to-wordpress/
p.s. if it just needs you to use the echo-ing version of the function: bp_the_topic_title() as suggested by @hnla, then please report back on this thread, so that we have the information.
I assumed you would have been trying to echo the result anyway. Please post all your relevant code in future
seem to only run within the loops which sounds right, can’t find a quick, easy means of passing it out.
I think though a ticket needs submitting? perhaps an enhancement? the title tag needs to be a little more intelligent, perhaps it’s gone unnoticed but browser bookmark titles are often taken from title tag.
Yes, a ticket does need to be created for this!
*Edit – ticket created:
https://trac.buddypress.org/ticket/2598
—
To have the topic content as meta description for forum threads, add the following to your theme’s functions.php file:
http://pastebin.com/w0rY2bnd