Hi
I was reading article here on applying The Open Graph protocol on my website.
I followed the instruction from this url - https://stackoverflow.com/questions/19778620/provide-an-image-for-whatsapp-link-sharing to share link in whatsapp messages.
None of the information I added in the html code inside function.php of child theme is working for me.
Here is what I did.
-
My opengraph is disabled
-
Inside function.php that is located on this path:
I added the following code:
<?php
// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to Pro in this file.
// =============================================================================
// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
// 01. Enqueue Parent Stylesheet
// 02. Additional Functions
// =============================================================================
// Enqueue Parent Stylesheet
// =============================================================================
add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
// Additional Functions
// =============================================================================
add_action('wp_head', 'head_information', 9999);
function head_information () { ?>
<title>Contact me for any UI UX Design work. Call me at +1(647)228-6351</title>
<meta property="og:image" content="http://rajivsarna.com/ogp.jpg" />
<meta property="og:image:secure_url" content="https://rajivsarna.com/ogp.jpg" />
<meta property="og:image:type" content="image/jpg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />
<meta property="og:image:alt" content="Rajiv Sarna's headshot" />
<meta property="og:title" content="Personal website of Rajiv Sarna" />
<meta name="description" content="User Interface Designer, User Experience Designer, Visual Designer, Artist, Painter, Design Thinking, Innovator">
<?php }
3 - Then I uploaded 400 x 300 px image in the root directory of my website. And its called ogp.jpg
When I’m sharing(copy and paste) my home page link on the whatsapp, Its showing my logo image which is different from ogp.jpg that I uploaded and my title description is not updating from the og tags above.
Am I missing anything?