WordPress.org

Ready to get started?Download WordPress

Forums

WP Maintenance Mode
[resolved] facebook like... (2 posts)

  1. qzonk
    Member
    Posted 1 year ago #

    hi just added facebook like button to my WP Maintenance Mode and also

    <meta property="og:title" content="coca cola"/>
        <meta property="og:type" content="food"/>
        <meta property="og:url" content="http://cola.com"/>
        <meta property="og:image" content="http://cola.com/cola.jpg"/>
        <meta property="og:site_name" content="coca cola"/>
        <meta property="og:description" content="love my cola"/>

    to site.php but when i like and post to facebook there is only my website url missing other property...

    how can i fix this

    thanks for any help and btw gr8 plugin...

    http://wordpress.org/extend/plugins/wp-maintenance-mode/

  2. Frank
    Member
    Plugin Author

    Posted 1 year ago #

    This OG data was add to the head of site.php.
    Use the hook wp_head to add your OG meta data, like in a small plugin.

    add_action( 'wp_head', 'fb_example_og' );
    	function fb_example_og() {
    	?>
    		<meta property="og:title" content="coca cola"/>
    		<meta property="og:type" content="food"/>
    		<meta property="og:url" content="http://cola.com"/>
    		<meta property="og:image" content="http://cola.com/cola.jpg"/>
    		<meta property="og:site_name" content="coca cola"/>
    		<meta property="og:description" content="love my cola"/>
    	<?php
    	}

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.