Community Forums › Forums › Archived Forums › General Discussion › Featured Image How To
Tagged: featured image
- This topic has 14 replies, 3 voices, and was last updated 10 years, 4 months ago by Brad Dalton.
-
AuthorPosts
-
April 16, 2014 at 3:26 pm #100803leemarrMember
my featured images are not displaying on the single page ...
i don't want to spend time inserting the images ...how can i resolve this ...
using executive pro & minimum pro ...
thanx
http://loop48.com/bump/April 17, 2014 at 6:46 am #100932Brad DaltonParticipantApril 23, 2014 at 9:54 am #102059leemarrMemberlet me clarify ...
i want to see a full image displayed in the post (single post page) ...
will your solution do this ...thanx
April 23, 2014 at 9:56 am #102060Brad DaltonParticipantApril 23, 2014 at 10:17 am #102065leemarrMembercan you tell which line to start in functions to edit/replace ...
thanx
April 23, 2014 at 10:48 am #102076Brad DaltonParticipantYou don't edit any existing code.
You copy the code from here https://gist.githubusercontent.com/braddalton/384b81c569d20591797c/raw/4b640bac5b93b51ae98ee829f437fb4e6a773aee/functions.php
And paste it at the end of your child themes functions.php file using a code editor like Notepad++.
April 23, 2014 at 11:50 am #102086leemarrMemberthe image is not showing up ...
here's what is displayed :view --- http://loop48.com/bump/todays-hot-dog-boy-031414/
view posts from the rest of category archive page --- http://loop48.com/bump/category/dogworld/
i placed the code last under the //* Register widget areas --- see below:
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'home-slider',
'name' => __( 'Home - Slider', 'executive' ),
'description' => __( 'This is the slider section on the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home - Top', 'executive' ),
'description' => __( 'This is the top section of the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-cta',
'name' => __( 'Home - Call To Action', 'executive' ),
'description' => __( 'This is the call to action section on the home page.', 'executive' ),
) );
genesis_register_sidebar( array(
'id' => 'home-middle',
'name' => __( 'Home - Middle', 'executive' ),
'description' => __( 'This is the middle section of the home page.', 'executive' ),
) );/** Align featured image left of entry content below entry title */
add_action( 'genesis_entry_header', 'wpsites_post_image', 14 );
/**
* @author Brad Dalton
* @example http://wpsites.net/web-design/display-featured-image-before-or-after-entry-title-on-single-posts-pages/
* @copyright 2014 WP Sites
*/
function wpsites_post_image() {if ( !is_singular('post') || ! 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' ) );
}}
April 23, 2014 at 12:39 pm #102091SummerMember@leemarr, try inserting the image into the post body without setting it as the Featured Image (that really is the only way to get it to display as part of the single post).
If you insert your featured image in the post body but leave the "Featured Image" box empty, Genesis will use that first post image as the featured image.
This is a unique Genesis feature that works by default unless you override it with a declared Featured Image, or by turning it off in functions.
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkApril 24, 2014 at 10:59 am #102177leemarrMemberthat does does the trick but i was trying to avoid doing this because all my posts use the featured image to display the full image in a post ...
my previous theme used this method ...
when i switched to genesis exec pro and the minimum pro theme i ran into this problem ...
April 24, 2014 at 4:33 pm #102242SummerMemberHm, maybe I'm misunderstanding what you're trying to achieve?
If you insert an image of any size into the body of your post, Genesis will automatically display a resized crop of that image as the featured image in archive/category listings... isn't that what you said you wanted to do in your original post?
For example if you insert a post image that's 350px wide by 600px high, and your featured image is only 150x150, Genesis will display the 150x150 crop of that image as the featured image when you look at the archives (and I know this happens, from years of experience)
Or did I misunderstand and you wanted to do something different with which image is which?
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkApril 25, 2014 at 8:03 am #102308leemarrMemberno i don't want to insert an image ...
i want to click the feature image link (in meta box) and either upload an image to display a full image in the post or choose a library item to display a full image ...
my old theme does exactly this and there is no need to choose the add an image link ...
April 25, 2014 at 10:13 am #102323Brad DaltonParticipantPlease post code correctly otherwise anyone that copies the code now will get errors http://www.studiopress.community/faq/#code
April 25, 2014 at 2:40 pm #102373SummerMember@leemarr, your best bet might be to copy the code from your old theme that does this and include in the functions.
It sounds like whomever did your old theme might have included some custom code to display the featured image in the body of the single post, in which case that may have been a modification of the single post template, but I couldn't be certain without seeing the behavior you're talking about that you want to achieve now.
WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
Slice of SciFi | Writers, After DarkApril 29, 2014 at 1:02 pm #102973leemarrMemberas requested here's the code:
//* Register widget areas
genesis_register_sidebar( array( ‘id’ => ‘home-slider’, ‘name’ => __( ‘Home – Slider’, ‘executive’ ), ‘description’ => __( ‘This is the slider section on the home page.’, ‘executive’ ), ) ); genesis_register_sidebar( array( ‘id’ => ‘home-top’, ‘name’ => __( ‘Home – Top’, ‘executive’ ), ‘description’ => __( ‘This is the top section of the home page.’, ‘executive’ ), ) ); genesis_register_sidebar( array( ‘id’ => ‘home-cta’, ‘name’ => __( ‘Home – Call To Action’, ‘executive’ ), ‘description’ => __( ‘This is the call to action section on the home page.’, ‘executive’ ), ) ); genesis_register_sidebar( array( ‘id’ => ‘home-middle’, ‘name’ => __( ‘Home – Middle’, ‘executive’ ), ‘description’ => __( ‘This is the middle section of the home page.’, ‘executive’ ), ) );
/** Align featured image left of entry content below entry title */
add_action( ‘genesis_entry_header’, ‘wpsites_post_image’, 14 );
/**
* @author Brad Dalton
* @example http://wpsites.net/web-design/display-featured-image-before-or-after-entry-title-on-single-posts-pages/
* @copyright 2014 WP Sites
*/function wpsites_post_image() { if ( !is_singular(‘post’) || ! genesis_get_option( ‘content_archive_thumbnail’ ) ) return; if ( $image = genesis_get_image( array( ‘format’ => ‘url’, ‘size’ => genesis_get_option( ‘image_size’ ) ) ) ) { printf( ‘%s‘, get_permalink(), $image, the_title_attribute( ‘echo=0′ ) ); } }
April 29, 2014 at 2:24 pm #102986Brad DaltonParticipantThe code will break your site if you copy and paste it because its been copied from the web page.
Please paste the code from a file into Github Gists.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.