• Resolved damtox

    (@damtox)


    Hi,
    I have code:

    add_filter( 'wpseo_breadcrumb_single_link', 'wpseo_remove_breadcrumb_link', 10 ,2);
    function wpseo_remove_breadcrumb_link( $link_output , $links ){
        $page_src = $links['url'];
        $last_word = basename( $page_src );
        $text_to_remove = 'sklep';
    
        if( $last_word == $text_to_remove ) {
            $link_output = '';
        }
    
        return $link_output;
    }

    This removes the link from HTML, but does not remove it from ld+json.
    As with “@type”: “BreadcrumbList”, Remove:

    {
    	                    "@type": "ListItem",
    	                    "position": 2,
    	                    "item": {
    	                        "@type": "WebPage",
    	                        "@id": "https://localhost/test/sklep/",
    	                        "url": "https://localhost/test/sklep/",
    	                        "name": "Sklep"
    	                    }
    	                },

    Anyone can help?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @damtox,

    Thanks for reaching out.

    Are you trying to disable the Yoast SEO Schema entirely? If you return false or an empty array on the wpseo_json_ld_output filter, you disable all Yoast SEO’s schema output.

    add_filter( 'wpseo_json_ld_output', '__return_false' );

    You can learn more here

    Thread Starter damtox

    (@damtox)

    I only want to remove the indicated piece of code.

    Hi @damtox,

    There’s a separate API for the Yoast schema data. You can find more details and examples for removing schema pieces in the developer documentation here: https://developer.yoast.com/features/schema/api/#to-add-or-remove-graph-pieces

    We’re not able to give you the code for your specific case, but we’ll leave this open for a week to just in case if anyone else can give you more specifics.

    Thread Starter damtox

    (@damtox)

    @priscillamc @maybellyne
    And if I buy the premium version of woocommerce – are you going to help me with it?

    Plugin Support Maybellyne

    (@maybellyne)

    @damtox

    While we are not sure if activating a Yoast WooCommerce SEO subscription will solve the problem you are experiencing, we do know it comes with technical support at [email protected]?helpdesk. We could then troubleshoot the issue and resolve it. If we are not able to resolve any issue, or if you do not wish to use it anymore, we do offer a 30-day refund and you can view refund policy here:?https://yoast.com/refund-policy/.

    Plugin Support devnihil

    (@devnihil)

    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 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove link with ld+json ??’ is closed to new replies.