• 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

SeoGreenPea

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
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • April 15, 2017 at 9:02 am in reply to: Use 2 Different Featured Image Sizes In Content Archives 1 for Blog & 1 for CPT? #204825
    SeoGreenPea
    Member

    Thank you Brad, but I've come up with my own solution. I'm sure your solution is probably better, but this is what I was able to use that allowed me to accomplish the end result I was after.

    // This removes the featured image from books archive entries
    add_action('genesis_before_loop','custom_remove_book_featured_image');
    function custom_remove_book_featured_image() {
    	if ( is_post_type_archive( 'books' ) || is_archive() && is_tax( 'book-type' ) ) {
    remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    	}
    }
    
    // This adds the featured image size ‘book’ to my books archive entries
    add_action( 'genesis_entry_content', 'custom_add_book_featured_image', 1 );
    function custom_add_book_featured_image() {
    	global $post;
    	if ( is_post_type_archive( 'books' ) || is_archive() && is_tax( 'book-type' ) ) {
    	if ( $image = genesis_get_image( 'format=url&size=book' ) ) {
    		printf( '<div class="featuredbookimage"><img src="%s" alt="%s" class="aligncenter" itemprop="image" /></div>', $image, the_title_attribute( 'echo=0' ) );
    	}
    	else {
    		printf( '<div class="featuredbookimage"><img src="%s" alt="%s" class="aligncenter" /></div>', get_bloginfo( 'stylesheet_directory' ) . '/images/noimage200200.png', the_title_attribute( 'echo=0' ) );
    	}
    
    }
    }
    March 20, 2017 at 9:15 am in reply to: Show Specific Taxonomy Types in Genesis Entry Footer / Post Meta / Post Terms #203471
    SeoGreenPea
    Member

    I appreciate you providing your input, referenced options and examples.

    I'll still need to probably figure out how to create my own custom genesis post terms shortcode using the get_terms method so I can select a specific taxonomy and exclude the others that are attached to my custom post type. Because I have tons of taxonomies and child taxonomies, my code above might not be efficient, even if I did figure out how to attach a permalink to a custom field.

    Thank you.

    I'm still looking for a solution that will work for my issue.

    March 20, 2017 at 7:57 am in reply to: Show Specific Taxonomy Types in Genesis Entry Footer / Post Meta / Post Terms #203452
    SeoGreenPea
    Member

    Thank you, I'll have to look into "filter it using genesis_post_terms_shortcode" which I'm not familiar with.

    I thought I'd offer up another solution I'm considering trying out.

    Each of my taxonomies have a custom field value that I'm using to output throughout the site elsewhere and for markup purposes.

    I thought I might skip the entire...

    if ('book' == get_post_type() || is_tax( 'book-type' ) ) {
    $post_meta = '[post_terms taxonomy="book-type" before="Type Of Book: "]';
    return $post_meta;
    }

    and just use a function similar to...

    add_action('genesis_entry_footer', 'custom_post_meta_filter');
    function custom_post_meta_filter() {
    if ('book' == get_post_type() || is_tax( 'book-type' ) ) && genesis_get_custom_field('book_tax_type_name_scary') ) && genesis_get_custom_field('book_tax_type_name_reading_level_one') )
    echo '<p class="entry-meta">Type Of Book: '. genesis_get_custom_field('book_tax_type_name_scary') .', '. genesis_get_custom_field('book_tax_type_name_reading_level_one') .'</p>';
    }

    But then because I'm using approximately 100 different taxonomy types that all have approximately 10-15 child taxonomy types, I'd end up writing a ton of functions. Assuming my above example would even work. The additional problem with the above code is that I wouldn't have the permalink attached to the custom field, which is also another obstacle.

    I'm sure I can learn how to include the permalink, but I'll have to see if the code above even accomplishes what I'm after.

    Using the genesis_post_terms_shortcode sure sounds easier and more efficient though.

    Thanks for your input!

    March 20, 2017 at 7:21 am in reply to: Show Specific Taxonomy Types in Genesis Entry Footer / Post Meta / Post Terms #203446
    SeoGreenPea
    Member

    I guess I'm not quite following you, but I appreciate your time in suggesting.

    Still looking for a solution.

    Thanks.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)

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