• 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

Adding rel=share to featured 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 › Adding rel=share to featured image

This topic is: resolved

Tagged: featured image

  • This topic has 4 replies, 3 voices, and was last updated 7 years, 2 months ago by Jose.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • March 14, 2016 at 7:19 am #181392
    Jose
    Member

    Hi, I'm using parallax pro theme - and have included the following code, to have the image appear before the header title.

    
    // Display Featured Image Post Top
    add_action( 'genesis_before_entry', 'featured_post_image', 8 );
    function featured_post_image() {
      if ( ! is_singular( 'post' ) )  return;
    	the_post_thumbnail('post-image');
    }
    

    In order to ensure that only the featured image gets shared via Appsumo Share - they have an option to identify images with "rel=share" - but how do I include that in the code.

    http://mariasmenu.com/beef/mutton-kofta-kabab-recipe
    March 14, 2016 at 8:25 am #181399
    Davinder Singh Kainth
    Member

    This can be good starting point - http://www.wprecipes.com/how-to-automatically-add-rellightbox-to-all-images-embedded-in-a-post


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

    March 18, 2016 at 4:10 am #181750
    Jose
    Member

    Thanks Davinder... but the featured image is not linked to the post... we just need to add rel=share - isn't that post for replacing the link as well?

    March 18, 2016 at 8:35 am #181784
    Genesis Developer
    Member

    Replace

    the_post_thumbnail('post-image');

    WITH

    the_post_thumbnail('post-image', array( 'rel' => 'share' ) );


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    March 21, 2016 at 1:26 am #181960
    Jose
    Member

    Fantastic mate! Did the trick... I knew there was a simple way of doing this!

    btw, ur plugins look very interesting... especially the filter plugin for categories... can I use that on non-foodie pro 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

© 2023 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