Forum Replies Created
-
AuthorPosts
-
gswartzMember
Yes, if I add it to a blog post, it shows up 3 times.... I'm guessing once for each function in the function file?
gswartzMemberYes, I added the css to our style.css file. Here's the page that "should" have the featured image showing up. http://royaloakhealth.hiringhook.com/about-us/
gswartzMemberOk, here's my functions file. I've got all 3 functions in there which include the class but still no featured image shows up. Can you tell me specifically what I'm missing?
<?php /** Start the engine */ include_once( get_template_directory() . '/lib/init.php' ); /** Child theme (do not remove) */ define( 'CHILD_THEME_NAME', 'Corporate Theme' ); define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/corporate' ); define( 'CHILD_THEME_VERSION', '2.0' ); $content_width = apply_filters( 'content_width', 620, 450, 930 ); /** Add new image sizes */ add_image_size( 'featured', 500, 240, TRUE ); add_image_size( 'featured-image', 700, 350, TRUE ); add_image_size( 'home-middle', 275, 100, TRUE ); /** Add suport for custom background */ add_custom_background(); /** Add support for custom header */ add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 130 ) ); /** Change breadcrumb location */ remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); add_action( 'genesis_after_header', 'genesis_do_breadcrumbs' ); /** Add support for 3-column footer widgets */ add_theme_support( 'genesis-footer-widgets', 3 ); /** Register widget areas */ genesis_register_sidebar( array( 'id' => 'featured', 'name' => __( 'Featured', 'corporate' ), 'description' => __( 'This is the featured section.', 'corporate' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle-1', 'name' => __( 'Home Middle #1', 'corporate' ), 'description' => __( 'This is the home middle #1 section.', 'corporate' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle-2', 'name' => __( 'Home Middle #2', 'corporate' ), 'description' => __( 'This is the home middle #2 section.', 'corporate' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle-3', 'name' => __( 'Home Middle #3', 'corporate' ), 'description' => __( 'This is the home middle #3 section.', 'corporate' ), ) ); /** * @author Brad Dalton * @example http://wpsites.net/web-design/add-featured-image-before-content-in-any-theme/ * @copyright 2014 WP Sites */ add_filter( 'the_content', 'wpsites_featured_image_before_content' ); function wpsites_featured_image_before_content( $content ) { if ( is_singular('post') && has_post_thumbnail()) { $featuredimage = get_the_post_thumbnail(); $content = $featuredimage . $content; } return $content; } add_filter( 'the_content', 'wpsites_image_before_content' ); function wpsites_image_before_content( $content ) { if ( is_singular('post') && has_post_thumbnail()) { $img = get_the_post_thumbnail($post_id, 'full', array('class' => 'alignright')); $content = $img . $content; } return $content; } add_filter( 'the_content', 'wpsites_linked_image_before_content' ); function wpsites_linked_image_before_content( $content ) { if ( is_singular('post') && has_post_thumbnail($thumbnail->ID)) { echo'<a href="' . get_permalink( $thumbnail->ID ) . '" title="' . esc_attr( $thumbnail->post_title ) . '">'; echo get_the_post_thumbnail($thumbnail->ID, 'full', array('class' => 'alignright')); echo'</a>'; $content = $thumbnail . $content; } return $content; }
gswartzMemberBased on the blog post it sounds like the only thing I need to do to get it working is paste the small wpsites_featured_image_before_content function code into my functions file. I did this but still no featured image is showing up.
gswartzMemberThank you but from what I'm reading on that page it sounds like it's geared toward a site wide footer edit. I'm trying to make the footer appear one way on the home page and then different throughout the rest of the site. I'm not seeing how to do that in the link provided.
-
AuthorPosts