• Resolved joyryde

    (@joyryde)


    Hello –

    We just spent 6 hours trying to fix this problem, thinking that a plugin was causing it, only to find out that the Neve theme is the cause of the issue.

    The homepage of our website is set to have a featured image:
    https://nomadicsupply.com/wp-content/uploads/2021/07/Vanlife-on-the-Lost-Coast.jpg

    The featured image does not work when sharing the home page of the website. When someone sends a link via iMessage (for example), no featured image appears. When we share our home page with people, it shows the logo as the featured image instead of the preset featured image.

    When we test it on the Facebook Developers page, it works flawlessly when the theme is switched to 2021, and as soon as it’s switched back to Neve, it fails.

    https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fnomadicsupply.com%2F

    How do we fix this? WordPress developers have told us that the theme was built incorrectly and is missing this code in functions.php, but adding it doesn’t fix the theme:

    add_theme_support( 'post-thumbnails' );

    When people share our website, we need the preview to be branded specifically the way that we require, not showing our generic logo in place of the featured image that we set.

    • This topic was modified 3 years, 2 months ago by joyryde.
    • This topic was modified 3 years, 2 months ago by joyryde.
    • This topic was modified 3 years, 2 months ago by joyryde.
    • This topic was modified 3 years, 2 months ago by joyryde.
    • This topic was modified 3 years, 2 months ago by joyryde.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi, joyryde, I’m another Neve user.

    I did a quick search for the meta tags and just realized that you were right. The theme doesn’t generate open graph meta tags.

    No open graph meta tags are generated using the content from the page with the theme.

    You could try something along the lines of this code that I wrote, although it doesn’t account for the existing meta graph tags you have on your site:

    define('current_theme_name', 'Neve');
    $theme = wp_get_theme(); // gets the current theme
    if ( current_theme_name == $theme->name || current_theme_name == $theme->parent_theme ) {
       add_action( 'wp_head', 'add_meta_tags_hestia' , 10 );
    }
    
    function add_meta_tags_hestia()
    {
    	if (is_page()):
    		global $post;
    	?>
    		<meta property="og:title" content="<?php echo get_the_title($post);?>"/>
    		<meta property="og:image" content="<?php echo get_the_post_thumbnail_url($post)?>" />
    		<meta property="og:description" content="<?php echo get_the_excerpt($post)?>"/>
    		
    		<meta name="twitter:card" content="summary_large_image">
    		<meta name="twitter:title" content="<?php echo get_the_title($post);?>"/>
    		<meta name="twitter:description" content="<?php echo get_the_excerpt($post)?>"/>
    		<meta name="twitter:image" content="<?php echo get_the_post_thumbnail_url($post)?>" />
    	<?php
    	endif;
    }

    Note it only applies to pages.

    Where are those existing metagraph tags coming from on your site?`

    • This reply was modified 3 years, 2 months ago by Ian Sackofwits. Reason: wrong theme
    Thread Starter joyryde

    (@joyryde)

    Hi Ian!

    The Rank Math plugin creates the OG tags, but according to them, it’s the themes flaws that cause this and their tags can’t resolve the issue until the theme is fixed.

    I appreciate the code! I’ll try to modify it and see what happens!

    Hi @joyryde!

    Please make sure you added the featured image to Rank Math -> Titles & Meta -> OpenGraph Thumbnail and saved the changes, as you can see here. Then, when you go to Facebook sharing debugger and scrape again the URL, the featured image should be displayed in the preview. I tested this and it worked as expected for me, as you can see here.

    Have a nice day!

    Thread Starter joyryde

    (@joyryde)

    We already did that (on all of our websites) and all that does is force Facebook and iMessage to use the image that was forced on that setting, not the featured image in posts and pages.

    That’s why we already provided the link showing exactly that above:

    https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fnomadicsupply.com%2F

    Hi @joyryde!

    I checked your site and it seems that the featured image currently set for the site is the one from this link, which is the logo. Please make sure you properly set the desired image as featured image. I tested this and for my test instance the correct image is displayed, as you can see in the screenshots provided in my previous answer, so the issue doesn’t seem to be theme related. I also tested a product page from your site, and that works as expected too – screenshot.

    Have a nice day!

    Thread Starter joyryde

    (@joyryde)

    Hi, unfortunately that’s not the case. The Feature Image is the Featured Image. The logo is what is set in Rank Math -> Titles & Meta -> OpenGraph Thumbnail because that’s what you said to do.

    The Featured Image is what the theme can’t handle correctly.

    See here:

    https://www.awesomescreenshot.com/image/13796278?key=99d5846bc4ec300f55fcc359628c55ac

    Thread Starter joyryde

    (@joyryde)

    I figured it out, it is a failure of the Neve Theme as I’d suspected. Their website provides a workaround:

    https://docs.themeisle.com/article/1263-neve-how-to-display-the-featured-image-on-pages

    Hi there!

    I’m glad to hear you found the workaround for single pages! This is not a failure of Neve, it’s the way the theme works, hence the documentation you pointed at above.

    Have a good day!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Featured Images Do Not Work?’ is closed to new replies.