The functions.php and CSS seem to be working fine, I just can’t get the home.php correct…
OK.
It looks like I’m trying to insert my 3 widgets code in between these two…
if ( is_active_sidebar( ‘home-feature-3’ ) ) {
echo ‘<div id=”home-feature-bg”><div class=”wrap”><div class=”home-feature-3″>’;
dynamic_sidebar( ‘home-feature-3’ );
echo ‘</div><!– end .feature-3 –></div><!– end .wrap –></div><!– end #home-feature-bg –>’;
}
if ( is_active_sidebar( ‘home-feature-4’ ) ) {
echo ‘<div id=”home-feature-bg-alt”><div class=”wrap”><div class=”home-feature-4″>’;
dynamic_sidebar( ‘home-feature-4’ );
echo ‘</div><!– end .feature-4 –></div><!– end .feature-4 –></div><!– end #home-feature-bg-alt –>’;
}
Do I create home feature 3 as one separate section, then duplicate it and name section 4 as a separate section, then duplicate welcome feature 1-3 (rename 4-6), then insert welcome feature 4-6 in between them?
Sorry I keep getting errors, I’m trying to figure out how to go about this…
With the code from the previous post I keep losing the slider widget….
I added 4,5,6 to the functions meta but it’s still not coming out right.
function epik_home_genesis_meta() {
if ( is_active_sidebar( ‘slider’ ) || is_active_sidebar( ‘welcome-wide’ ) || is_active_sidebar( ‘welcome-feature-1’ ) || is_active_sidebar( ‘welcome-feature-2’ ) || is_active_sidebar( ‘welcome-feature-3’ ) || is_active_sidebar( ‘welcome-feature-4’ ) || is_active_sidebar( ‘welcome-feature-5’ ) || is_active_sidebar( ‘welcome-feature-6’ ) || is_active_sidebar( ‘home-feature-4’ ) || is_active_sidebar( ‘home-feature-5’ ) || is_active_sidebar( ‘home-feature-6’ ) || is_active_sidebar( ‘home-feature-7’ ) || is_active_sidebar( ‘home-feature-8’ ) || is_active_sidebar( ‘home-feature-9’ ) || is_active_sidebar( ‘home-feature-10’ ) || is_active_sidebar( ‘home-feature-11’ ) || is_active_sidebar( ‘home-feature-12’ ) || is_active_sidebar( ‘home-feature-13’ ) || is_active_sidebar( ‘home-feature-14’ ) ) {
/**
* Display widget content for "Home Feature Middle" section.
*
*/
function epik_home_loop_helper_middle() {
if ( is_active_sidebar( 'home-feature-1' ) || is_active_sidebar( 'home-feature-2' ) ) {
echo '';
if ( is_active_sidebar( 'home-feature-1' ) ) {
echo '';
dynamic_sidebar( 'home-feature-1' );
echo '<!-- end .feature-1 -->';
}
if ( is_active_sidebar( 'home-feature-2' ) ) {
echo '';
dynamic_sidebar( 'home-feature-2' );
echo '<!-- end .feature-2 -->';
}
echo '<!-- end .wrap --><!-- end #home-feature-bg-alt -->';
}
/**
* Display widget content for the "Home Feature 2" section.
*
*/
function epik_home_loop_helper_welcome() {
if ( is_active_sidebar( 'welcome-feature-4' ) || is_active_sidebar( 'welcome-feature-5' ) || is_active_sidebar( 'welcome-feature-6' ) ) {
echo '';
echo '';
if ( is_active_sidebar( 'welcome-feature-4' ) ) {
echo '';
dynamic_sidebar( 'welcome-feature-4' );
echo '<!-- end .welcome-feature-4 -->';
}
if ( is_active_sidebar( 'welcome-feature-5' ) ) {
echo '';
dynamic_sidebar( 'welcome-feature-5' );
echo '<!-- end .welcome-feature-5 -->';
}
if ( is_active_sidebar( 'welcome-feature-6' ) ) {
echo '';
dynamic_sidebar( 'welcome-feature-6' );
echo '<!-- end .welcome-feature-6 -->';
}
echo '<!-- end .welcome-features --><!-- end .wrap --><!-- end #welcome -->';
}
}
if ( is_active_sidebar( 'home-feature-3' ) ) {
echo '';
dynamic_sidebar( 'home-feature-3' );
echo '<!-- end .feature-3 --><!-- end .wrap --><!-- end #home-feature-bg -->';
}
if ( is_active_sidebar( 'home-feature-4' ) ) {
echo '';
dynamic_sidebar( 'home-feature-4' );
echo '<!-- end .feature-4 --><!-- end .feature-4 --><!-- end #home-feature-bg-alt -->';
}
}
Is the code I’m using above correct? I’m not quite sure where to paste it in the functions.php.
I took out the wide portion because I don’t need a second welcome feature wide, but I’m not sure I recoded it correct.
I get an error when I insert it.
10px Did it!
Perfect
Thank you Wes, I appreciate that!
I figured it out.
I switched, that worked out perfect.
Thanks Wes!
I did, that doesn’t work.
I think something’s going on with the conditional tags that’s preventing it from showing in the right place.
Oops, here’s the images of the issue –
I’d like it to butt up against the bottom of the slider (or even move to the bottom of the slider)…
Ok. I can get it to show up; however, it shows up in the spot where the slider is.
Can you help me get it to position directly under the slider?
Ok, I have the following code loaded first in home.php
<?php
/** Add Generate Box after header **/
add_action( ‘genesis_after_header’, ‘generate_box’ );
function generate_box() {
if ( is_active_sidebar( ‘generate-box’ ) ) {
echo ‘<div id=”generate-box”><div class=”wrap”>’;
dynamic_sidebar( ‘generate-box’ );
echo ‘</div><!– end .wrap –></div><!– end #generate-box –>’;
}
}
add_action( ‘genesis_meta’, ‘optimal_home_genesis_meta’ );
/**
* Add widget support for homepage. If no
I’ve added all of the CSS except for the responsive. Nothing. None of the CSS is showing up. Is this code affecting that?
No, I figured I’d check with the expert first 🙂 That was actually the portion that slowed me down and prompted me to contact you.
I’m not very familiar with this particular coding though I do have limited understanding…