Community Forums › Forums › Archived Forums › Design Tips and Tricks › add new widget area to metric theme?
- This topic has 4 replies, 2 voices, and was last updated 12 years, 2 months ago by
fotodog13.
-
AuthorPosts
-
April 3, 2013 at 6:22 pm #32967
fotodog13
ParticipantHi All-Hoping for some help adding a widget area to the metric theme - I have been screwing around with it for a few hours and although I am close, its still can't get it to work correctly.Heres- what I have done so far
-added the following to my functions.php file
// Add CTA section add_action('genesis_before_content', 'include_call_to_action_home_page_widgets'); function include_call_to_actions_home_page_widgets() { require(CHILD_DIR.'/home-cta.php'); }
added this to myhome.php ( using other code there as a guide)
<div class="top-cta"><?php if (!dynamic_sidebar('Call To Action-Home Page')) : ?> <div class="widget"> <?php endif; ?></div>
created home-cta.phpinside it looks like this
<div class="top-cta"><?php dynamic_sidebar( 'Call To Action-Home Page' ); ?></div>
when I look at the site temp url http://69.195.124.100/~harleyd5/
I can see the widget text but it is not formatting at all- if I look in firebug I can see the class but none of the info on the style sheet is showing up. If I add the same styling in firebug it appears,-
have tried numerous things but just cant- seem to get it to work correctly.I am using the latest version of metric , wordpress, and genesis-as always thanks to any and all that take the time to reply - its really appreciated.
April 3, 2013 at 6:37 pm #32976Brad Dalton
ParticipantWhere exactly do you want the widget area located?
And based on what conditions?
Better to use custom code in your child themes functions.php file.
April 4, 2013 at 5:01 am #33023fotodog13
ParticipantHi Brad,
So know just enough to get by here- following the tutorials in studio press on hooks. Ideally I want to place a widget that goes above the current home page top left and right widgets ( where the slide show appears on the home page. ) that goes all the way across.I want that widget to appear all the time on the home page.- just adding another widget area
Hope that explains it better - thanks for the reply- still have no luck getting this to work
best
Scott
April 4, 2013 at 5:39 am #33032Brad Dalton
ParticipantCan't see any slide show on your home page and there's 3 widgets.
Here's the code you paste at the end of your child themes functions.php file.
You can change the hook to the genesis_before_content_sidebar_wrap or genesis_before_content hook.
Remove the code you have used already.
April 4, 2013 at 9:22 am #33079fotodog13
ParticipantHey Brad
Thanks this is great- works perfect- fyi- not using the slideshow on the theme yet -waiting for stuff to come that the client is suppose to send to me- does that sound familiar- thats why I just put a photo in the home left area.
thanks so much for sending me the code - it was a huge help - looking forward to the day when I can play all the help I get in the forums forward to someone else-
best
Scott
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.