Community Forums › Forums › Archived Forums › Design Tips and Tricks › Outreach Theme – Extra Widgets Row
- This topic has 3 replies, 2 voices, and was last updated 11 years, 11 months ago by justinheron.
-
AuthorPosts
-
January 13, 2013 at 2:45 pm #11636justinheronMember
I am using the current Outreach theme which has 4 widgets through the centre of the home page, what I would like to do is add another identical row of 4 beneath these to give me 8 in total.
I have added 4 more in to the functions.php file and these appear in my dashboard fine for me to use (still in place) but when I add code to the home.php file, whatever I seem to do, once I have saved the changes seems to just give me blank web page so I know something is wrong.
My present home.php code is below, is anyone able to show/edit this for me as to the correct place to enter the additional items? I have added widget rows into other Genesis themes before but never had this problem.
<?php
add_action( 'genesis_meta', 'outreach_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function outreach_home_genesis_meta() {if ( is_active_sidebar( 'home-featured' ) || is_active_sidebar( 'home-1' ) || is_active_sidebar( 'home-2' ) || is_active_sidebar( 'home-3' ) || is_active_sidebar( 'home-4' ) ) {
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'outreach_home_featured' );
add_action( 'genesis_before_footer', 'outreach_home_sections', 3 );
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
add_filter( 'body_class', 'add_body_class' );function add_body_class( $classes ) {
$classes[] = 'outreach';
return $classes;
}}
}function outreach_home_featured() {
if ( is_active_sidebar( 'home-featured' ) ) {
genesis_widget_area( 'home-featured', array(
'before' => '<div class="home-featured widget-area">'
) );
}}
function outreach_home_sections() {
if ( is_active_sidebar( 'home-1' ) || is_active_sidebar( 'home-2' ) || is_active_sidebar( 'home-3' ) || is_active_sidebar( 'home-4' ) ) {
echo '<div id="home-sections"><div class="wrap">';
genesis_widget_area( 'home-1', array(
'before' => '<div class="home-1 widget-area">',
) );genesis_widget_area( 'home-2', array(
'before' => '<div class="home-2 widget-area">',
) );genesis_widget_area( 'home-3', array(
'before' => '<div class="home-3 widget-area">',
) );genesis_widget_area( 'home-4', array(
'before' => '<div class="home-4 widget-area">',
) );echo '</div><!-- end .wrap --></div><!-- end #home-sections -->';
}
}
genesis();
Hope someone can point me in the right direction with this one!
Many thanks,
Justin
January 13, 2013 at 3:20 pm #11646justinheronMemberI now seem to have been able to add to the home.php file without the site crashing but the sample text I have added in to the widgets on the wordpress dashboard isnt displaying.
I have left the changes that I have made to the functions.php and hone.php files in place in case someone needs / wants to take a look at them as I obviously have something wrong still somewhere.
The site can be viewed at http://www.kopthat.co.uk
January 13, 2013 at 10:10 pm #11745ChicGeekMemberHi,
I'm trying to do the same thing in Agency. Can you let me know how you did this. I added an extra row, but want them in their own section and that's where I'm getting stuck. Not sure what to name the hook. I got them in and added the widgets and see I need to duplicate this and that's where I'm stuck:
function agency_home_loop_helper() {
if ( is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) ) {
echo '<div id="home">';
echo '<div class="home-left">';
dynamic_sidebar( 'home-left' );
echo '</div><!-- end .home-left -->';echo '<div class="home-middle">';
dynamic_sidebar( 'home-middle' );
echo '</div><!-- end .home-middle -->';echo '<div class="home-right">';
dynamic_sidebar( 'home-right' );
echo '</div><!-- end .home-right -->';echo '</div><!-- end #home -->';
}
I was reading a thread that had the same question over the weekend and can't seem to find it.
Thanks!
Elisha
The Pixel Spot ♥ A Recommended STUDIOPRESS Customizer ♥ I Tweet
Genesis Junkie + Web & Graphic Designer + Ad World Girl + Student of Life
January 19, 2013 at 7:29 pm #13193justinheronMemberAfter playing around with this for a while and hunting everything down in the CSS as well I got it to display!
-
AuthorPosts
- The topic ‘Outreach Theme – Extra Widgets Row’ is closed to new replies.