• 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

Display featured image below post

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 › Display featured image below post

This topic is: not resolved

Tagged: featured image, featured image below post, php

  • This topic has 6 replies, 2 voices, and was last updated 8 years, 6 months ago by Sachin Verma.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • November 2, 2017 at 7:35 am #213172
    newedgemarketing
    Member

    Hi I am using this piece of code to add the featurred images below my title.

    which works however the image is clickable in the post. Which i don't want.

    any ideas how i can stop the image being a link?

    Code being used:
    add_action( 'genesis_entry_header', 'single_post_featured_image', 15 );

    function single_post_featured_image() {

    if ( ! is_singular( 'post' ) )
    return;

    $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
    printf( '%s', get_permalink(), the_title_attribute( 'echo=0' ), $img );

    }

    My theme is: Maker Pro

    https://stevemayall.com/wordpress-questions/
    November 2, 2017 at 7:48 am #213174
    Sachin Verma
    Member

    You can try the following code, please let me know if it doesn't work.

    add_action( 'genesis_entry_header', 'single_post_featured_image', 15 );
    
    function single_post_featured_image() {
    
    if ( ! is_singular( 'post' ) )
    return;
    
    $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
    printf( '%s', $img );
    
    }

    Wait! Do you want someone to fix your Genesis issues? Join the Happy Client Club starting $30/month. 🙂

    November 2, 2017 at 9:26 am #213184
    newedgemarketing
    Member

    Hi Sachin thanks for this.

    I've just tried it however and it hasn't worked.

    November 2, 2017 at 9:36 am #213185
    Sachin Verma
    Member

    Have you tried clearing the cache? It seems to work on my local install with maker pro theme.


    Wait! Do you want someone to fix your Genesis issues? Join the Happy Client Club starting $30/month. 🙂

    November 2, 2017 at 9:42 am #213186
    newedgemarketing
    Member

    I have but its actually broke my site at the moment so trying to fix that

    November 2, 2017 at 10:35 am #213188
    newedgemarketing
    Member

    I've got my site back up but that code clearly did not work for me. Any more ideas or should i repost the question?

    November 2, 2017 at 11:36 am #213199
    Sachin Verma
    Member

    I still think the cache was not cleared. The code seems to work with maker pro theme. Sorry, I don't have any other ideas.


    Wait! Do you want someone to fix your Genesis issues? Join the Happy Client Club starting $30/month. 🙂

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 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

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