Community Forums › Forums › Archived Forums › Design Tips and Tricks › display row of 3 featured posts/images above sidebar but under header
Tagged: featured images, featured posts, widgets
- This topic has 4 replies, 2 voices, and was last updated 11 years, 4 months ago by
dmcleod87.
-
AuthorPosts
-
October 7, 2013 at 10:06 pm #65790
dmcleod87
Memberi want to display a row of 3 featured posts/images above the sidebar but under the header, similar to this site-
http://www.crea8ivedesigns.com/
however instead of looking like that, the posts are one under the other and not above the sidebar.
i've registered the widgets succesfully-
/** Three Columns Template Widgets **/genesis_register_sidebar( array(
'id' => 'three-columns-left',
'name' => __( 'Three Columns Left', 'influencer' ),
'description' => __( 'Left column widget area of the Three Columns template', 'influencer' ),
) );genesis_register_sidebar( array(
'id' => 'three-columns-middle',
'name' => __( 'Three Columns Middle', 'influencer' ),
'description' => __( 'Middle column widget area of the Three Columns template', 'influencer' ),
) );genesis_register_sidebar( array(
'id' => 'three-columns-right',
'name' => __( 'Three Columns Right', 'influencer' ),
'description' => __( 'Right column widget area of the Three Columns template', 'influencer' ),
) );
and used the following template which i found here - http://journalxtra.com/easyguides/how-to-create-genesis-page-template-widgets-5127/
<?php /*
Template Name: Three Columns
*/ ?><?php
add_action( 'genesis_meta', 'influencer_three_columns_genesis_meta' );
/**
* Add widget support for Model template. If no widgets are active, display the default Genesis loop.
*
*/function influencer_three_columns_genesis_meta() {
if ( is_active_sidebar( 'three-columns-left' ) || is_active_sidebar( 'three-columns-middle' ) || is_active_sidebar( 'three-columns-right' ) ) {
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'influencer_three_columns_left' );
add_action( 'genesis_loop', 'influencer_three_columns_middle' );
add_action( 'genesis_loop', 'influencer_three_columns_right' );
add_filter( 'body_class', 'add_body_class' );function add_body_class( $classes ) {
$classes[] = 'influencer-three-columns';
return $classes;
}}
}function influencer_three_columns_left() {
if ( is_active_sidebar( 'three-columns-left' ) ) {
genesis_widget_area( 'three-columns-left', array(
'before' => '<div class="three-columns-left widget-area">',
) );
}}
function influencer_three_columns_middle() {
if ( is_active_sidebar( 'three-columns-middle' ) ) {
genesis_widget_area( 'three-columns-middle', array(
'before' => '<div class="three-columns-middle widget-area">',
) );
}}
function influencer_three_columns_right() {
if ( is_active_sidebar( 'three-columns-right' ) ) {
genesis_widget_area( 'three-columns-right', array(
'before' => '<div class="three-columns-right widget-area">',
) );
}}
genesis();
here is the css-
/** Three Rows Template Widget CSS **/.three-columns-left {
width: 32%;
margin-bottom: 15px;
padding:0px;
float: left;
clear: left;
background-image: none;
background-color: transparent;
}.three-columns-middle {
width: 32%;
margin-bottom: 15px;
margin-left:2%;
margin-right:2%;
padding:0px;
float: left;
clear: none;
background-image: none;
background-color: transparent;
}.three-columns-right {
width: 32%;
padding:0px;
float: right;
clear: right;
background-image: none;
background-color: transparent;
}
can someone tell me what i'm doing wrong or point me in the right direction? thanks!
http://influencer.dylanmcleod.net.au/homeOctober 8, 2013 at 2:43 am #65804Brad Dalton
ParticipantOctober 8, 2013 at 3:46 am #65815dmcleod87
Memberhi Brad thanks for the link.
have added the code, added the widgets and still nothing appears. changed the category to 'featured'
http://influencer.dylanmcleod.net.au/category/featured/
i was hoping to make this into a home page template if possible.
October 8, 2013 at 5:04 am #65819Brad Dalton
ParticipantWhat did you put in the widget areas?
You must have missed something.
October 8, 2013 at 3:19 pm #65884dmcleod87
Memberjust used the genesis featured posts widget. someone else has taken a look at my code and it works fine on a fresh install of the sample child theme, so i suspect it's something i've done to some other code which is why nothing is working.
going to start from scratch and see how i go. thanks for your help anyway.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.