Notifications
Clear all

wpForo 1.x.x [Solved] Math rank and wpforo

10 Posts
3 Users
2 Reactions
1,530 Views
t.niron
Posts: 87
Topic starter
(@t-niron)
Estimable Member
Joined: 5 years ago

@robert Hello,

I have configured the settings you said. I also disable the Rank Math plugin for wpforo, but the result has not changed. Can you help me with this? In addition, visuals are not shown on snippets.

thank you

Topic Tags
9 Replies
Alvina
Posts: 1862
Moderator
(@alvina)
Member
Joined: 5 years ago

Hi @t-niron,

Please provide a little more information about the issue.

1 Reply
t.niron
(@t-niron)
Joined: 5 years ago

Estimable Member
Posts: 87

@alvina Hello,

I add it as a meta to explain it better. This information was taken from heymeta.com/ Information.

Content Meta

Forum Home Meta

Forum Category Meta


Forum Topic Meta

The meta description for all categories was entered via wpForo. Please check the links in the images.

Thank you

Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

Hi @t-niron,

Please leave your forum URL and explain what have you done to fix the compatibility issue?

What code did you add in your website and where exactly? Leave some screenshot of that code in the place.

6 Replies
t.niron
(@t-niron)
Joined: 5 years ago

Estimable Member
Posts: 87

@robert Hello,

I have added the following code to the child theme function.php line. To disable the RM plugin. I didn't do anything else.

add_action( 'wp_head', function(){ // pass the page ids to the function below if( is_page('432')) { remove_all_actions( 'rank_math/head' ); add_action( 'wp_head', '_wp_render_title_tag', 2 ); } },

RM support team said that wpForo has its own SEO options, and disabling RM for wpFORO might work. But it didn't work.

Thank you

nakvaryum.com/forum

Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10591

@t-niron,

What code is this? And here you find it? First you should not use it as a one line, it turns all the whole code. Second this is not actual with current versions of Rank Math SEO plugin. Please remove that code.

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)

t.niron
(@t-niron)
Joined: 5 years ago

Estimable Member
Posts: 87

@robert Hello,

I received the code from the Rank Math support team. Since I didn't know how to put it here, a single line came out. The original is as follows;

What is the code you gave me? Does it disable RM support for Wpforo?

Thank you

Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10591

@t-niron,

The code I provided stops RM on wpForo pages and let wpForo load its own correct SEO data.

t.niron
(@t-niron)
Joined: 5 years ago

Estimable Member
Posts: 87

@robert Hello,

We discussed this code with the Ranking Math team. They have examined your plugin better and there are new developments. I share the answer given to me.

Hello,

We have taken a closer look at this and it appears that the WPForo team has changed the priority of the WP hook in their plugin. The priority of wp hook should be 11, now it is 10. It basically means that Rank Math’s meta is NOT taking priority over wpForo’s meta.

Please contact wpForo team and ask them to change the priority back to 10. Here is a code can provide the wpForo team which will fix this issue immediately:

add_action( 'wp', function() {
	if ( ! wpforo_feature( 'seo-meta' ) ) return;
	if ( is_wpforo_page() ) {
		if ( defined('RANK_MATH_FILE') ) { // Rank Math SEO
			add_filter( 'rank_math/frontend/remove_credit_notice', '__return_true' );
			remove_all_actions( 'rank_math/head' );
			remove_all_filters( 'pre_get_document_title', 15 );
			add_action( 'wp_head', '_wp_render_title_tag', 1 );
		}
	}
}, 11 );

Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

Thank you,

Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10591

@t-niron,

Ok, thank you. we'll add this in next version update.