• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Default homepage image for Digital Pro (Sharing on social shows wrong image)

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Default homepage image for Digital Pro (Sharing on social shows wrong image)

This topic is: not resolved

Tagged: digital pro

  • This topic has 4 replies, 2 voices, and was last updated 8 years, 2 months ago by Brad Dalton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 8, 2017 at 11:38 am #206118
    mleithwood
    Member

    Hello,

    The front page image for Digital Pro theme is not what is being picked up as the default image when shared on Facebook and other social. Instead an widget image mid-site is the one being shown.

    How can I make the front-page image the one that is the default shared image for my site?

    http://www.melissaleithwood.com

    Many thanks!

    http://www.melissaleithwood.com
    May 8, 2017 at 2:11 pm #206124
    Brad Dalton
    Participant

    Hi

    What sharing service are you using?


    Tutorials for StudioPress Themes.

    May 8, 2017 at 2:50 pm #206132
    mleithwood
    Member

    Hi Brad,

    genesis simple share. or even when i just post my link into a Facebook post.

    many thanks!

    May 8, 2017 at 3:22 pm #206135
    mleithwood
    Member

    Hi Brad,

    here is a link to the image (btw I've been on your email list for 4 years!) - https://drive.google.com/file/d/0B0K2ueHyXiXgc3JOdXM4UTFwbTA/view?usp=sharing

    May 8, 2017 at 8:04 pm #206143
    Brad Dalton
    Participant

    I looked in the plugin files and it looks like it grabs the featured image if it exists otherwise it checks the content for img tags and returns the src value of the first image tag using the get_first_image function you can see in the following code:

    	
    $image = ( $image = genesis_get_image( array( 'format' => 'url', 'size' => 'full' ) ) ) ? $image : $this->get_first_image();
    

    Here's the full function

    /**
    	 * Checks content for  tags and returns the src value of the first image tag
    	 *
    	 * @since 0.1.0
    	 *
    	 * @returns mixed
    	 *
    	 */
    	function get_first_image( ) {
    
    		$content = get_the_content();
    
    		$output = preg_match_all('/<img[^>]+src=[\'"]([^\'"]+)[\'"][^>]*>/i', $content, $matches);
    
    		if( $output )
    			return $matches[1][0];
    
    		return false;
    
    	}
    

    There's no filter so i don't think you can modify the default value for the $output variable or any of the parameters using for the $image variable.

    I'll post this question on the plugin forums with a link to this question and see if the plugin devs have a solution.

    Thanks for following wpsites.net for 4 years!


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble