• Resolved manu87

    (@manu87)


    Hello,
    I want to remove the author from opengraph with following code in functions-php:

    add_filter(
    'wpseo_frontend_presenter_classes'
    , function($filter) {
    return array_diff($filter, [
    'Yoast\WP\SEO\Presenters\Open_Graph\Article_Published_Time_Presenter',
    'Yoast\WP\SEO\Presenters\Open_Graph\Article_Modified_Time_Presenter',
    'Yoast\WP\SEO\Presenters\Open_Graph\Article_Author_Presenter',
    ]);
    }
    );


    Only removing ‘Yoast\WP\SEO\Presenters\Open_Graph\Article_Author_Presenter’ is not working. What I am doing wrong?

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

    (@maybellyne)

    Hello @manu87

    I’m sorry that the custom code isnt working but I’m unable to review it as it’s beyond our scope of support here. You may consider speaking to a web developer to have a look for you.

    Thread Starter manu87

    (@manu87)

    Hi @maybellyne ,
    well I am a developer. It should be a bug in your presenters, because I have checked the same way how:
    'Yoast\WP\SEO\Presenters\Open_Graph\Article_Published_Time_Presenter',
    'Yoast\WP\SEO\Presenters\Open_Graph\Article_Modified_Time_Presenter',

    Hey @manu87,

    Thank you for your reply.

    Actually, I was checking the documentation and the filter wpseo_opengraph_author_facebook still works. So I tried adding

    add_filter( 'wpseo_opengraph_author_facebook' , '__return_false' ); to a local installation and that removed the meta tag <meta property="article:author".

    Thread Starter manu87

    (@manu87)

    Hey @jeroenrotty ,
    thank you very much, this works great.

    Hey @manu87,

    Thank you for confirming! We’ll mark the topic as resolved. Feel free to create a new topic if you have any other question.

    Have a great day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove opengraph author don’t work’ is closed to new replies.