Open graph data automatically outputted by royal?

This topic has 16 replies, 5 voices, and was last updated 8 years, 1 months ago ago by Eva Kemp

  • Avatar: emeliech
    emeliech
    Participant
    December 1, 2015 at 09:54

    Hello,

    I noticed that when using yoast SEO and its open graph feature, the facebook debugger says there are duplicate og:url tags.

    Yoast has the ability to add an admin to the open graph. I also think they provide some more features when it comes to manually selecting what images to show.

    1. What are your recommendations on this?

    2. Is royal outputting open graph data automatically?

    3. How can I turn off the Royal theme open graph data?

    Thank you!

    15 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    December 1, 2015 at 10:15

    Hello,

    You can find the code in wp-content/themes/royal/framework/theme-functions.php, lines 1243-1247. Delete it if you don’t need this information.

    Regards,
    Eva Kemp.

    Avatar: emeliech
    emeliech
    Participant
    December 1, 2015 at 12:06

    Thank you!

    Is this an update proof solution?

    How would it be possible to make it update proof?

    Thank you!

    Avatar: Eva
    Eva Kemp
    Support staff
    December 1, 2015 at 12:36

    Hello,

    Could you please clarify with more details?
    Thank you.

    Regards,
    Eva Kemp.

    Avatar: emeliech
    emeliech
    Participant
    December 1, 2015 at 16:15

    If i update the theme, will I need to remove the code again?

    thank you

    Avatar: stan
    Stan Russell
    Participant
    December 1, 2015 at 16:56

    Hello emeliech,

    yes, you will need to delete this part of code once more time after theme update.
    If you do not want to do this – you can set up Child Theme and add edited code to file ‘functions.php’.
    Your customization will not be lost after theme update.

    Regards,
    Stan Russell.

    Avatar: emeliech
    emeliech
    Participant
    December 3, 2015 at 09:10

    hmm.

    are you sure?

    Would i not need to create the same path for the child file:

    “child”/framework/theme-functions.php ?

    Thanks!

    Avatar: Robert Hall
    Robert Hall
    Support staff
    December 3, 2015 at 09:44

    Hello,

    Yes, you should saving folder structure.

    Regards,
    Robert Hall.

    Avatar: caroum
    caroum
    Participant
    January 13, 2016 at 20:18

    I have the same problem, however the lines you mention will probably not be the same since the php file changes in new theme version. So… what is the exact code I should be deleting to get rid of the duplicate og:url tags?

    Thanks!

    Avatar: Eva
    Eva Kemp
    Support staff
    January 14, 2016 at 09:53

    Hello @caroum,

    The code in in the file wp-content/themes/royal/framework/theme-functions.php, lines 1256-1260.

    Regards,
    Eva Kemp.

    Avatar: emeliech
    emeliech
    Participant
    February 24, 2016 at 19:08

    Hello Eva,

    Could you please tell me exactly what lines I need to remove please.

    Line 1256-1260 doesnt seem to be the correct lines

    Thanks

    Avatar: Eva
    Eva Kemp
    Support staff
    February 24, 2016 at 19:25

    Hello @emeliech,

    Please provide us with FTP credentials.

    Thank you.
    Regards,
    Eva Kemp.

    Avatar: emeliech
    emeliech
    Participant
    February 24, 2016 at 19:27

    No I just want to know the code that says on those lines so I can remove them myself

    I need to know so I can also remove them in future updates, as your theme does not provide me with an option to remove them

    Avatar: Eva
    Eva Kemp
    Support staff
    February 24, 2016 at 19:43

    Hello @emeliech,

    We need to check your theme files to know what theme version you’re using and give you correct lines.

    Regards,
    Eva Kemp.

    Avatar: emeliech
    emeliech
    Participant
    February 24, 2016 at 20:00

    well ok. please see private

    We are using the parent theme royal. thanks

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    February 25, 2016 at 08:40

    Hello @emeliech,

    You need remove the lines 1235-1239 in the file wp-content/themes/royal/framework/theme-functions.php, the code is:

    echo '<meta property="og:title" content="' . get_the_title() . '"/>';
    echo '<meta property="og:type" content="article"/>';
    echo '<meta property="og:description" content="' . $description . '"/>';
    echo '<meta property="og:url" content="' . get_permalink() . '"/>';
    echo '<meta property="og:site_name" content="'. get_bloginfo('name') .'"/>';

    Regards,
    Eva Kemp.

  • Viewing 16 results - 1 through 16 (of 16 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.