Page Not Found for title

#31655
Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    I have added the following code to your theme to modify the Rank Math title & robots meta on the Discy profile pages:

    /**
     * Filter to change the page title.
     * 
     * @param string $title
     */
    add_filter( 'rank_math/frontend/title', function( $title ) {
    	
    	if(wpqa_is_user_profile()){
    		$title = '';
    	}
    	return $title;
    });
    
    /**
     * Allows filtering of the robots meta data.
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	if(wpqa_is_user_profile()){
    		$robots['index'] = 'index';
    		$robots['follow'] = 'follow';
    		$robots['max-snippet'] = 'max-snippet:-1';
    		$robots['max-video-preview'] = 'max-video-preview:-1';
    		$robots['max-image-preview'] = 'max-image-preview:large';
    	}
    	return $robots;
    });

    Please check and let me know if everything is working as expected.

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Page Not Found for title’ is closed to new replies.