• Resolved Andrew_shk

    (@andrew_shk)


    Hello!

    I have another title tag autogen filter plugin for product category.

    I want delete meta title tag.

    Previously it was possible to remove meta title with this code:

    add_filter( 'wpseo_title', 'remove_category_wpseo_title' );
     
    function remove_category_wpseo_title( $title ) {
        if ( is_product_category() || is_shop() ) {
            return false;
        }
        
        return $title;
    }

    But now is not working.

    I found in dev portal, but this code delete all meta data.

    add_action( 'template_redirect', 'remove_wpseo' );
    
    /**
     * Removes output from Yoast SEO on the frontend for a specific post, page or custom post type.
     */
    function remove_wpseo() {
        if ( is_product_category() || is_shop() ) {
            $front_end = YoastSEO()->classes->get( Yoast\WP\SEO\Integrations\Front_End_Integration::class );
    
            remove_action( 'wpseo_head', [ $front_end, 'present_head' ], -9999 );
        }
    }
    

    How can I delete meta title tag from product category?

Viewing 4 replies - 1 through 4 (of 4 total)
  • @andrew_shk We’re sorry abut unfortunately we can’t offer support on custom code. Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on this or how to make changes to it.

    Yoast SEO includes filters that allow you or your developer to customize many of our plugin features. These filters are documented inside the plugin code. We also have a developer portal where you can find more information about filters and even check out some examples of how to use them.

    Unfortunately, there’s a difference between the support we can offer and the level of programming needed to change (core) features of our plugin. Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes. And even though we cannot be of any assistance, you’re completely free to change anything in the plugin to better suit your needs.

    Maybe someone watching these forums can assist you further, but if your topic is inactive for 7 days, we’ll mark it as resolved to keep the overview.

    Thank you for your understanding.

    Thread Starter Andrew_shk

    (@andrew_shk)

    Ok, but why if I in plugin setting deactivate generate meta tags for product category, it not deactivate generate meta tags for product category. I have premium version plugin, but it not have this functionality.

    Why this function disable all functions, include mine code?
    https://developer.yoast.com/customization/yoast-seo/disabling-yoast-seo
    I want this function disable ONLY yoast seo code.

    And API title tag coming soon…
    https://developer.yoast.com/features/seo-tags/titles/api

    Maybe could you help with this function, please?

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi @andrew_shk

    If you have an active Yoast SEO Premium subscription, you can email us directly at support@yoast.com.

    We’ll see what we can do and see what information we can provide that might be of help, but do keep in mind there is still a limit to the support we can offer regarding custom code and the implementation on your site (even with premium support).

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

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

The topic ‘Disable title generate on specific category or page’ is closed to new replies.