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

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Solved] Wpforo with rankmath

3 Posts
2 Users
0 Reactions
3,056 Views
Posts: 2
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
(@osmantarar)
New Member
Joined: 6 years ago
[#13184]

i have sent this message to rank math team:

before installing rankmath my forums from wpforo show at the top browser tab “forum name and forum page name” but after rank math intallation it only shows forums | website name.

before:
https://drive.google.com/open?id=1fhTpwMYmG2e1BiJorXgRTp7UkB_a8WsI
after:
https://drive.google.com/open?id=1aTWYBbrEV9O_aAHydrFXJrkTDku0ewLs

there ans was:

Please add the following code in your theme’s functions.php file:

add_action( 'wp_head', function() {
    if ( IS_WP_FORO_PAGE ) {
	    remove_all_filters( 'pre_get_document_title', 15 );
    }
}, 1 );

You will have to change the condition to run this on wpForo pages only.

Also, you can also forward this to the wpForo team so they can add it to their plugin.

 

what do i need to do now?


2 Replies
Robert
Posts: 10716
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

Last year we've added this code in wpForo to disable it on wpForo pages:

if ( defined('RANK_MATH_FILE') ) { // Rank Math SEO
remove_all_actions( 'rank_math/head' );
add_filter( 'rank_math/frontend/remove_credit_notice', '__return_true' );
}

So there should not be such problem. Maybe they have changed their hooks, so please contact them and refer them to this topic.

 

But you can ty their code with the small change. Here is the final code. You should put it in the active WordPress theme functions.php file:

add_action( 'wp_head', function() {
if( function_exists('is_wpforo_page') && is_wpforo_page() ){
remove_all_filters( 'pre_get_document_title', 15 );
}
}, 1 );

How to Easily Add Custom Code in WordPress (without Breaking Your Site)


Posts: 2
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
(@osmantarar)
New Member
Joined: 6 years ago

thanks it works...


Share: