Community Forums › Forums › Archived Forums › General Discussion › Feature image showing on category page of Streamline Pro
- This topic has 6 replies, 2 voices, and was last updated 10 years, 10 months ago by
davidsteele.
-
AuthorPosts
-
March 30, 2014 at 1:43 am #97389
davidsteele
MemberHi,
Is there anyway to remove the feature image showing on category pages of Streamline Pro? I was trying to remove through function.php and genesis setting but it also remove the feature image inside the post excepts. Any suggestion how to fix this?
Thanks,
http://relationshipcoach.org/sailinghappilyeveraftertest/category/blog/
DavidMarch 31, 2014 at 4:19 pm #97769Cathy @ WPBarista
MemberHi David,
Find this in your functions file://* Add post image above post title add_action( 'genesis_entry_header', 'streamline_post_image', 1 ); function streamline_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' ) ); } }
and replace with this:
//* Add post image above post title
add_action( 'genesis_entry_header', 'streamline_post_image', 1 );
function streamline_post_image() {if ( is_page() || is_category() || ! genesis_get_option( 'content_archive_thumbnail' ) )
return;if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
printf( '', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
}}
Visit WP Barista to download 52 Quick Edits You Can do Today to Get More Clicks / Views / Sales. I also do paid support (starting at $75) and fully custom Genesis Child Themes.March 31, 2014 at 4:19 pm #97766Cathy @ WPBarista
MemberHi David
you can remove the featured images by editing the functions file:
Find this://* Add post image above post title add_action( 'genesis_entry_header', 'streamline_post_image', 1 ); function streamline_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' ) ); } }
and replace with this:
//* Add post image above post title add_action( 'genesis_entry_header', 'streamline_post_image', 1 ); function streamline_post_image() { if ( is_page() || is_category() || ! 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' ) ); } }
Visit WP Barista to download 52 Quick Edits You Can do Today to Get More Clicks / Views / Sales. I also do paid support (starting at $75) and fully custom Genesis Child Themes.March 31, 2014 at 4:19 pm #97764Cathy @ WPBarista
MemberYes, if you're comfortable editing the functions file:
look for this code:
//* Add post image above post title
add_action( 'genesis_entry_header', 'streamline_post_image', 1 );
function streamline_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( '', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
}}
and change it to this:
//* Add post image above post title
add_action( 'genesis_entry_header', 'streamline_post_image', 1 );
function streamline_post_image() {if ( is_page() || is_category() || ! genesis_get_option( 'content_archive_thumbnail' ) )
return;if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
printf( '', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
}}
Visit WP Barista to download 52 Quick Edits You Can do Today to Get More Clicks / Views / Sales. I also do paid support (starting at $75) and fully custom Genesis Child Themes.March 31, 2014 at 4:19 pm #97762Cathy @ WPBarista
MemberAll excerpts are treated the same for "archive" pages. Archives include search results, dated archives, author archives, blog page and categories.
To remove images from categories, look for your functions.php file.
1. Take a copy and keep it where you'll remember on your computer
2. look for this entry://* Add post image above post title
add_action( 'genesis_entry_header', 'streamline_post_image', 1 );
function streamline_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( '', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
}}
3. change it to this:
//* Add post image above post title
add_action( 'genesis_entry_header', 'streamline_post_image', 1 );
function streamline_post_image() {if ( is_page() || is_category() || ! genesis_get_option( 'content_archive_thumbnail' ) )
return;if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
printf( '', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
}}
Visit WP Barista to download 52 Quick Edits You Can do Today to Get More Clicks / Views / Sales. I also do paid support (starting at $75) and fully custom Genesis Child Themes.April 1, 2014 at 2:30 am #97854davidsteele
MemberHi @CathyT,
Thank you so much, I was able to fix it now base on your given solution. Here's my final code that works on my site:
//* Add post image above post title
add_action( 'genesis_entry_header', 'streamline_post_image', 1 );
function streamline_post_image() {if ( is_page() || is_category() || ! genesis_get_option( 'content_archive_thumbnail' ) )
return;if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
printf( '', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
}}
Appreciate your help!
- DavidApril 3, 2014 at 10:49 pm #98396davidsteele
MemberHi CathyT,
Do you have any idea how I can align the featured image on the left side of the content in the category pages?
Thanks,
David -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.