Community Forums › Forums › Archived Forums › Design Tips and Tricks › How To 3 widgets above the footer widgets
- This topic has 2 replies, 2 voices, and was last updated 10 years, 12 months ago by
fotodog13.
-
AuthorPosts
-
February 19, 2014 at 7:04 pm #91306
fotodog13
ParticipantHi All,
Once Again I am asking for some help from one of the geniuses in the forum.I am using the Metric theme and would like to add a second set of 3 column widgets above the current 3 column footer widgets. I want these new widgets to appear on all of the pages just like the current footer widgets do,
In digging through the forums I was able to find how to add a second set above widgets above the current footer widgets , but cannot figure out how to get them to appear correctly except on the home page.
I have made a set of sidebars for the home page , and another set for" inside pages" as well.
When I add content to the " inside page " widgets it appears but the styling is missing somethings, and these widgets appear on the home page as wellHere is a sample of code I added to my functions. php file ( probably not the way to do it - I tried working with the brilliant code that Brad Dalton posted but think I just screwed it up )
genesis_register_sidebar( array(
'id' => 'middle-widget-b1',
'name' => __( 'Middle-Widget-B1', 'metric' ),
'description' => __( 'This is the set of widgets directly above the footer widgets', 'metric' ),
) );
/**
* @author Brad Dalton - WP Sites
* @example http://wpsites.net/web-design/feature-box-genesis-home-page/
*/
add_action( 'genesis_after_content_sidebar_wrap', 'genesis_middle_widget_b1' );
function genesis_middle_widget_b1() {
if (is_active_sidebar('middle-widget-b1' ) ) {
genesis_widget_area( 'middle-widget-b1', array(
'before' => '<div class="middle-widget-b1" class="widget-area">',
'after' => '</div>',
) );}}
genesis_register_sidebar( array(
'id' => 'middle-widget-b2',
'name' => __( 'Middle-Widget-B2', 'metric' ),
'description' => __( 'This is the middle set of widgets directly above the footer widgets ib row b', 'metric' ),
) );
/**
* @author Brad Dalton - WP Sites
* @example http://wpsites.net/web-design/feature-box-genesis-home-page/
*/
add_action( 'genesis_after_content_sidebar_wrap', 'genesis_middle_widget_b2' );
function genesis_middle_widget_b2() {
if (is_active_sidebar( 'middle-widget-b2' ) ) {
genesis_widget_area( 'middle-widget-b2', array(
'before' => '<div class="middle-widget-b2" class="widget-area">',
'after' => '</div>',
) );}}
genesis_register_sidebar( array(
'id' => 'middle-widget-b3',
'name' => __( 'Middle-Widget-B3', 'metric' ),
'description' => __( 'This is the middle set of widgets directly above the footer widgets ib row b far right', 'metric' ),
) );
/**
* @author Brad Dalton - WP Sites
* @example http://wpsites.net/web-design/feature-box-genesis-home-page/
*/
add_action( 'genesis_after_content_sidebar_wrap', 'genesis_middle_widget_b3' );
function genesis_middle_widget_b3() {
if (is_active_sidebar( 'middle-widget-b3' ) ) {
genesis_widget_area( 'middle-widget-b3', array(
'before' => '<div class="middle-widget-b3" class="widget-area">',
'after' => '</div>',
) );}}
If there is a better way to add a second set of "footer widgets" above the existing ones that are there that I can rename that is probably a better solution.
As always would really appreciate some help from someone that can help me out here ( perpetual noobie it seems- hard as try )
Thanks to all
Scott V
http://69.195.124.163/~aielloho/service-plans/February 21, 2014 at 1:27 am #91560Davinder Singh Kainth
MemberTry this - http://www.wptaskforce.com/genesis-theme-add-3-column-widgets-under-footer-widgets/
Sunshine PRO genesis theme
Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis ThemesFebruary 21, 2014 at 8:09 am #91617fotodog13
ParticipantHi Davinder- thanks for the reply but that did not seem to work , but I have been working on it more and am getting closer-
I have been able to add a second set of widgets and they display perfectly on the inside pages - but cannot get them to display correctly on the Metric Home page.
If I could remove the new set from appearing on the home page now I think that I would be all set.
Here is what I have in my functions.php file now- * adding this puts the widgets on all pages of the web site but I cannot get the styling to work for them on the Home page-
genesis_register_sidebar( array(
'id' => 'middle-widget-b1',
'name' => __( 'Middle-Widget-B1', 'metric' ),
'description' => __( 'This is the set of widgets directly above the footer widgets', 'metric' ),
) );
/**
* @author Brad Dalton - WP Sites
* @example http://wpsites.net/web-design/feature-box-genesis-home-page/
*/
add_action( 'genesis_after_content', 'genesis_middle_widget_b1' );
function genesis_middle_widget_b1() {
if (is_active_sidebar('middle-widget-b1' ) ) {
genesis_widget_area( 'middle-widget-b1', array(
'before' => '<div class="middle-widget-b1" class="widget-area">',
'after' => '</div>',
) );}}
genesis_register_sidebar( array(
'id' => 'middle-widget-b2',
'name' => __( 'Middle-Widget-B2', 'metric' ),
'description' => __( 'This is the middle set of widgets directly above the footer widgets ib row b', 'metric' ),
) );
/**
* @author Brad Dalton - WP Sites
* @example http://wpsites.net/web-design/feature-box-genesis-home-page/
*/
add_action( 'genesis_after_content', 'genesis_middle_widget_b2' );
function genesis_middle_widget_b2() {
if (is_active_sidebar( 'middle-widget-b2' ) ) {
genesis_widget_area( 'middle-widget-b2', array(
'before' => '<div class="middle-widget-b2" class="widget-area">',
'after' => '</div>',
) );}}
genesis_register_sidebar( array(
'id' => 'middle-widget-b3',
'name' => __( 'Middle-Widget-B3', 'metric' ),
'description' => __( 'This is the middle set of widgets directly above the footer widgets ib row b far right', 'metric' ),
) );
/**
* @author Brad Dalton - WP Sites
* @example http://wpsites.net/web-design/feature-box-genesis-home-page/
*/
add_action( 'genesis_after_content', 'genesis_middle_widget_b3' );
function genesis_middle_widget_b3() {
if (is_active_sidebar( 'middle-widget-b3' ) ) {
genesis_widget_area( 'middle-widget-b3', array(
'before' => '<div class="middle-widget-b3" class="widget-area">',
'after' => '</div>',
) );}}
My thinking is that another Hook could be added below this in the functions php file that would prevent these widgets from appearing on the home page. Any thoughts on how that might be done?
Thanks again for your initial help- even though it did not work for me I greatly appreciate it
Best
Scott V -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.