BBPress pagination not used for canonical

#562295
  • Resolved Uk Sentinel
    Rank Math free

    Hi

    I use WordPress and BBPRESS for my forum and have noticed that with RankMath, Google indexes my forum well but Bing does not work well if my BBPRESS forum > Topic has more than one page.

    I have worked out that this is not an RankMath problem (same happens with Yoast) but I wondered if there was a fix RankMath could Offer.

    So issue is “canonical” related and BBPRESS / WordPress names conical for the following URL different to that of the actual URL.

    For some reason Bing seems to like the “canonical” reference ?

    Note: I have tested this and content on first page of URL is discover-able on Bing, but on page 2 / 3 etc. bing bot has issues ?

    e.g.

    URL = https://uktechhub.com/forums/topic/asus-zenwifi-pro-et12-official-thread/page/3/

    and

    <link rel=”canonical” href=”https://uktechhub.com/forums/topic/asus-zenwifi-pro-et12-official-thread>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Pointing the paginated pages to the main page using canonical helps in avoiding duplicate content issues and it is usually this way.

    However, you can try the following filter to force the self-referencing canonical URL of your forum topics:

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
    	global $wp;
    	$current_slug = home_url( $wp->request );
    
    	if ( is_paged()) {
    		$canonical = $current_slug . '/';
    	}
    	return $canonical;
    });

    Here’s how you can add a filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

    Thank you.

    Hi Reinelle

    That filter worked perfectly and thank you for the quick response

    Hello,
    
    You’re welcome.

    We are super happy that this issue is already resolved. If you have any other questions in the future, know that we are here to help you.
    
    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
    
    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
    
    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘BBPress pagination not used for canonical’ is closed to new replies.