• 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

minimum portfolio double 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 › minimum portfolio double image

This topic is: not resolved

Tagged: featured image, minimum, portfolio

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 1 month ago by tribalcafe.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 3, 2013 at 6:58 am #9155
    tribalcafe
    Member

    I am using the following code to move the image above the post in the minimum theme which works great on blog posts but it causes the portfolio page to have two images

    http://www.garyfox.co.uk/portfolio/
    add_action( 'genesis_before_post_content', 'generate_post_image', 5 );
    function generate_post_image() {

    if ( is_page() || ! genesis_get_option( 'content_archive_thumbnail' ) )
    return;

    if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
    printf( '<a href="%s" rel="bookmark"><img src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
    }

    }
     

    January 26, 2013 at 3:50 pm #15116
    SoZo
    Member

    You need to exclude the portfolio template in your conditional


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 28, 2013 at 2:20 pm #15667
    tribalcafe
    Member

    John thanks for your help much appreciated

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