Output Rank Math og_title (SEO Title) to Replace Frontend Title

#49101
  • Resolved Brad Tan
    Rank Math free

    Hi, refer to the my question, I found the right path, but I cannot figure out how?

    I look forward you help to output the og_title (SEO Tile – not facebook og_title or twitter og_title) to replace the Page, Post, Category, Tag, Product, Product Category, Product Tag Title.

    refer to Example 1
    refer to Filter to change the Title

    Thousand Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Todd
    Rank Math free

    Hi,

    The code given on the posts should help:

    add_filter( "rank_math/opengraph/facebook/og_title", function( $content ) {
    	global $post;
    	if($post){
    		return get_the_title($post->ID);
    	}
    	return $content;
    });

    As much as we would love to offer customized solution to each and every user we have, it just isn’t possible for a small company like ours with limited resources. So, any further customization will need to be done by you since we do not offer customised solutions. Sorry.

    Please do not hesitate to let us know if you need our assistance with anything else.

    Well noted. I had done some search and study each WC and WP hook & filter, before post the question here.

    Let me dive deeper, and feedback to you.

    Hello,

    Thank you for contacting Rank Math today.

    Please let us know if we can help further.

    Thank you.

    ​​​​​​

    OMG! your almost miss lead me to wrong direction.

    I had found the solution, that I use wp_title() output to replace the page title.

    But, by the way, your very fast response.

    Thousand thanks

    Todd
    Rank Math free

    Hi,

    I am glad it is working fine now.

    Please do not hesitate to let us know if you need our assistance with anything else.

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

The ticket ‘Output Rank Math og_title (SEO Title) to Replace Frontend Title’ is closed to new replies.