I want to remove meta and title for custom post type by theme madara

#426570
  • Resolved Phan Anh
    Rank Math free

    I have already tried this, i removed the contents from that field and leave them empty. But when ever i pressed the Save Changes button, page loads and that fields automatically filled with default values.
    How can I use the theme’s title?
    Thanks

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

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

    You can use the snippet editor within the Rank Math metabox to add the meta title manually. It allows you to manually edit the meta values as well.

    Looking forward to helping you.

    sitename/truyen/chuong

    No rank math installed: Title + chuong + site name
    https://ibb.co/GQSbK9d
    Installed rank math: Title + site name
    https://ibb.co/y5d9Y9w

    How do I delete these titles?
    https://ibb.co/ccbhn1x

    Hello,

    Those fields need to have a value so if you empty them, Rank Math will eventually add the default value. It cannot be empty.

    If you wish to remove the title tag from a certain post type, you may need to apply this filter code:

    add_filter( 'rank_math/frontend/title', function( $title ) {
    $post_type = get_post_type(get_queried_object());
      if ($post_type == 'your post type'){
        unset($title);
      }
      return $title;
    });

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

    OK everything is fine, thanks bro

    Am I doing this right?
    https://ibb.co/BNmXhVM
    It still doesn’t get the theme’s title but still uses rank math
    https://ibb.co/dkKvktm

    Hello,

    Can you please try clearing your website cache and check the view source again?

    Let us know how that goes.

    Looking forward to helping you.

    I’ve done it, thank you

    Hello,

    I am glad that we could address your concern.

    If you have further issues with our plugin, do not hesitate to let us know. We are here to help you.

    Thank you.

    Hi bro
    How do I delete the description?

    I adding code like this, right?
    https://ibb.co/1KJ8BKF

    Hello,

    Please replace the line where you are unsettling the description with something like this:

    
    $description = '';
    

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

    Where should I insert it?

    <?php
    add_filter( ‘rank_math/frontend/title’, function( $title ) {
    $post_type = get_post_type(get_queried_object());
    if ($post_type == ‘wp-manga’){
    unset($title);
    }
    return $title;
    });

    $description = ”;

    Is this correct?

    Hello,

    If you want to completely remove the meta description, the filter should look like this:

    add_filter( 'rank_math/frontend/description', function( $description ) {
        $description = '';
        return $description;
    });

    From your screenshot, you can remove this line: unset($description);

    Then replace it with this: $description = '';

    I hope that helps.

    Thank you.

    ok thanks you

    Hello,

    I am glad that we could help you with your concern. Do let us know if it works well on your end.

    Looking forward to helping you.

Viewing 15 replies - 1 through 15 (of 17 total)

The ticket ‘I want to remove meta and title for custom post type by theme madara’ is closed to new replies.