Article Type

#85771
  • Resolved Softfully group
    Rank Math free

    Hi,

    I have one thousand posts in the WordPress site and I want to change in Article Type Blog Post to News Article all together as default.
    So how can I do those in bulk?
    Because I think the article is not recommended by Google…
    Yet my default settings you can view in the attachment.
    Thank you

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math today.

    You can use the following filter to set default Snippet Article type for the post type.

    /**
     * Allow developer to default Snippet Article type by post type.
     *
     * @param string $type      Article Type.
     * @param string $post_type Post type name.
     *
     */
    add_filter( 'rank_math/settings/snippet/article_type', function( $type, $post_type ) {
     return $default;
    }, 10, 2 );

    You can also use the filter here to change front end data: https://rankmath.com/kb/filters-hooks-api-developer/#change-post-schema-data

    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 ‘Article Type’ is closed to new replies.