Original request: Requirements WordPress 4.0+ Genesis 2.2.0+ Atmosphere Pro Theme Genesis Featured Posts Combo Plugin Step 1 Drag and drop the “Genesis Featured Posts Combo” widget into Front Page 3 widget area. Now configure the following options: Layouts: Full Width (layout no. 7) Post Type: Post. You can select CPT. Check Show Post Title checkbox… Continue Reading
featured post
Displaying Backstretch Featured Image on Blog or Archive page in Genesis
First upload the backstretch.js and theme-script.js file in js folder of your child theme. Here is the script of theme-script.js file
1 2 3 4 5 6 |
jQuery(function( $ ){ $( "main.content .post .entry-image" ).each( function(){ var post_image = $(this).data( "entry-img" ); $(this).backstretch([BackStretchImg]=post_image,{duration:3000,fade:750}); }); }); |
Add the following code in your functions.php file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
add_action( 'wp_enqueue_scripts', 'enqueue_bs_script' ); function enqueue_bs_script() { wp_enqueue_script( 'backstretch-js', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' ); wp_enqueue_script( 'theme-script-js', get_bloginfo( 'stylesheet_directory' ) . '/js/theme-script.js', array( 'backstretch-js' ), '1.0.0' ); } add_action('get_header', 'backstretch_featured_image'); function backstretch_featured_image(){ // Loading Backstretch Featured image on Home, blog or archive pages if( is_home() || is_page_template('page_blog.php') || is_archive() ) : // Removing Default featured image remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); // Adding Featured image above the Post Title add_action( 'genesis_entry_header', 'genesis_do_bs_post_image', 6 ); endif; } function genesis_do_bs_post_image(){ $img = genesis_get_image( array( 'format' => 'src', 'size' => "full", 'context' => 'archive', 'attr' => array ( 'class' => 'alignnone post-image' ) ) ); if ( $img ) echo '<div class="entry-image" data-entry-img="'. home_url() . $img.'"></div>' . "\n"; } |
Add this single line of CSS in your style.css file
1 |
div.entry-image{ height: 400px; } |
Display 3 Columns Genesis Featured Posts in Home Section 2 of Parallax PRO theme
By three steps I created 3 columns featured posts in Home Section 2 widget area of Parallax PRO child theme. 1. Setup thumbnail size and regenerate the thumbnail 2. Setup Genesis Featured Post Widget 3. Add CSS in style.css file 1. Setup thumbnail size and regenerate the thumbnail Login to dashboard and open the functions.php… Continue Reading