• Resolved tras09

    (@tras09)


    Hi,

    I tried adding the below filter to the functions.php but the filter doesn’t work. I cleaned the cache but still not changing anything.

    add_filter( 'googlesitekit_generator', '__return_empty_string' );

    Any idea why this is not working for me?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Adam Dunnage

    (@adamdunnage)

    Hi there @tras09, thanks for getting in touch and sharing your issue. I’d be happy to look into this for you. When testing this filter myself I am having the desired outcome and the Site Kit meta tag is not being printed to the site source code.

    I can currently see the meta tag on your site. Could I ask you to try this with just the Site Kit plugin active on your site?

    Could you also try going to this URL which will spin up a test WordPress site with Site Kit pre-installed. Could you then set Site Kit up on this test site and try adding the same filter to the functions.php file and checking on this site?

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @tras09 Just to follow up once more, I can also see that you may be using a child theme on your site. Could I just also check with you where it is that you added the filter?

    Does the filter work for you when switching to the parent theme?

    Thread Starter tras09

    (@tras09)

    Hi @adamdunnage ,

    Thanks for all the suggestions. I tried them and it turns out that the filter is working and removing the site kit generator tag. I expected to additionally remove the meta description that is also generated by G site kit plugin.

    <meta name=”description” content=”Welcome…..

    Thread Starter tras09

    (@tras09)

    Here is an update from my end. I was able to remove as well the meta description by adding the following string.

    add_filter( 'googlesitekit_tag_manager_tag', '__return_empty_string' );

    Thanks again for your quick support.

    Best,

    Plugin Support Adam Dunnage

    (@adamdunnage)

    @tras09 That’s great to hear and nice work with that! You are very welcome.

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

The topic ‘Filter not working’ is closed to new replies.