Open Graph metatags

January 2012 WordPress Theme
GK User
Thu Oct 16, 2014 4:42 pm
Hello,

Is there an easy way to add Open Graph metatags to Custom Post Types, just like they are on posts. If not supported I really do feel that custom post types should be supported. The file concerned seems to be helpers.layout.fragments.php (gk-meta-post).

I managed to bring across the shortcodes from the post_type post to various custom post types however Im a little frustrated on these meta tags. Please point me in the right direction.

Regards,

Richard.
User avatar
Fresh Boarder

GK User
Fri Oct 17, 2014 1:20 pm
DELETE POST
REPORT THIS POST
REPLY WITH QUOTE
Hello,

Managed to add Page Additional Params to the Admin section on the Custom post types, however once set and saved they do not show on the single post for that custom post type nor on the custom archive.

What else is needed to get it to display on these? Some direction would save me alot of time.

R.
User avatar
Fresh Boarder

GK User
Mon Oct 20, 2014 8:03 am
Hi,

Add the following code into gavern_add_og_meta_box function from Game/gavern/helpers/helpers.features.php file.

Code: Select all
add_meta_box(
        'gavern_og_meta_box',
        'Open Graph metatags',
        'gavern_show_og_meta_box',
        'your_custom_post_name',
        'normal',
        'high'
    );
User avatar
Moderator


cron