Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1250555
Remove Multiple Og Meta
Closed

Comments

  • Kristofer started the conversation

    Hi,

    I have Yoast SEO installed with my Scalia theme. Problem is that I get double facebook og meta tags on my post pages where I have Scalia share buttons.

    I would only like the Yoast SEO og tags and remove the other one. How do I fix that? See the attached pictures.

    Thanks!

  •  6,933
    Oliver replied

    HI!

    You need to edit:

    /wp-content/themes/scalia/functions.php

    line 352

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Kristofer replied

    Exactly how should I edit that line? Im using Scalia child theme.

  •  6,933

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Kristofer replied

    Ok! I want to remove function scalia_open_graph.

    Im trying to add the remove action to child theme function.php. How should the correct code look like?

  •  6,933
    Oliver replied

    Something like this:

    add_action( 'wp_head', 'remove_action' );
    function remove_action(){
    	remove_action( 'wp_head', 'scalia_open_graph' );
    }


    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Kristofer replied

    For some reason, Im getting error 500 when I add that code to function.php in child theme. What do I need to change?

  •  6,933
    Oliver replied

    add_action( 'wp_head', 'remove_my_action');
    function remove_my_action(){   
    remove_action( 'wp_head', 'scalia_open_graph', 9999  );
    }

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • Kristofer replied

    That one worked great.

    Thanks!