Single Post Title/Description For Posts Under A Particular Tag

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

    Thank you for contacting Rank Math and bringing your concern to our attention.

    Please try adding the following code to see if it’s working for you:

    
    /**
     * Allow changing the meta description sentence from within the theme.
     *
     * @param string $description The description sentence.
     */
    add_filter( 'rank_math/frontend/description', function( $description ) {
    	global $post;
    	if (has_tag('latest-hollywood-movies')){//Tag slug
    		$description = "Download %title% - Free download Movie for Mobile in the best quality format. Also stream %title% on your mobile, tablets, and iPads."; //Replace description in quotes
    	}
    	return $description;
    });
    
    /**
     * Filter to change the page title.
     * 
     * @param string $title
     */
    add_filter( 'rank_math/frontend/title', function( $title ) {
    	global $post;
    	if (has_tag('latest-hollywood-movies')){ //Tag slug
    		$title = "%title% Full Movie Download %sep% Melody Blog"; //Replace title in quotes
    	}
    	return $title;
    });
    

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

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Thank you. And I will get back to you shortly.

    Alhan
    Rank Math free

    Hello,

    Please keep us updated on your progress with the provided solutions. We eagerly await your response.

    To ensure you have ample time and support, we’ll keep this support ticket open until your issue is fully resolved.

    Please don’t hesitate to get in touch if you have any other questions.

    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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Single Post Title/Description For Posts Under A Particular Tag’ is closed to new replies.