AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] Include topic title in site page title

10 Posts
6 Users
3 Reactions
6,790 Views
Posts: 14
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@joekotvas)
Eminent Member
Joined: 9 years ago
[#5286]

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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

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: 1593
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@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
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@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: 8 years ago

Prominent Member
Posts: 533
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
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: 10735
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 2 months ago

Thank you for sharing this code.


Page 1 / 2
Share: