Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!

Merry Christmas and Happy Holidays! 🎄

wpForo 1.x.x [Solved] Include topic title in site page title

10 Posts
6 Users
3 Reactions
6,116 Views
Posts: 14
Topic starter
(@joekotvas)
Eminent Member
Joined: 9 years ago

How can I get wpForo topic titles to show up in the page titles? Right now the page title is static, always displaying the same thing no matter what forum topic I am viewing.

I could update on the fly with JavaScript, but this does not help me for social sharing and SEO purposes.

 


Topic Tags
9 Replies
1 Reply
(@joekotvas)
Joined: 9 years ago

Eminent Member
Posts: 14

Note: I see the page titles displaying correctly in this forum. Any ideas why they are not displaying correctly in mine?

https://compartelsp.com/foros/palabras/repeche/#post-18


Posts: 1599
(@anonymous20)
Noble Member
Joined: 10 years ago

The title IS working well for me also.

You seem to have some conflict. Disable your plugins one by one and find the cause of it.

Or even enable WP DEBUG.LOG and check for possible errors.


Posts: 14
Topic starter
(@joekotvas)
Eminent Member
Joined: 9 years ago

Hm... I'm thinking it may be a conflict with the Divi theme. Still digging, very frustrating.


Posts: 14
Topic starter
(@joekotvas)
Eminent Member
Joined: 9 years ago

Ok, hacked it! 

To make this work on my site, I had to add the following line to my child theme's functions.php : 

 
add_filter( 'pre_get_document_title', 'wpforo_meta_wp_title', 100);

Note, this is taken and modified from line 625 of /wpforo/wpf-includes/wpf-hooks.php. I just changed the filter from 'wp_title' to 'pre_get_document_title'.

 


1 Reply
(@central4allgmail-com)
Joined: 7 years ago

Prominent Member
Posts: 533
Posted by: @joekotvas

Ok, hacked it! 

To make this work on my site, I had to add the following line to my child theme's functions.php : 

 
add_filter( 'pre_get_document_title', 'wpforo_meta_wp_title', 100);

Note, this is taken and modified from line 625 of /wpforo/wpf-includes/wpf-hooks.php. I just changed the filter from 'wp_title' to 'pre_get_document_title'.

 

Can you tell us what to do , the exact steps ?

Jusr edit the line in /wpforo/wpf-includes/wpf-hooks.php

Or?


Robert
Posts: 10606
Admin
(@robert)
Support Team
Joined: 10 years ago

Thank you for sharing this code.


Page 1 / 2