Paul Barthmaier
Supreme Deity
In Training
Lifetime member
Community Engagement Likes (0)
Trying to follow Sarah Gooding's Post
http://wpmu.org/how-to-widgetize-a-page-post-header-or-any-other-template-in-wordpress/
Declared new widget area in child theme's functions.php
Created header-home.php
where do I add my code to add the widget?

Responses (4)
Community Engagement (joined April 2010) Likes (0)
I put this into the index-home.php
if ( is_home() ) :
get_header('home');
else :
get_header();
endif;
so I guess I can have a limited header-home.php.
The main thing I want to achieve is have the widget inline with the header image.
Community Engagement (joined April 2010) Likes (0)
Well, Pali Baacsi, haven't we told you already, you like to make things oh so difficult on yourself! Sure, you can do the things that you've outlined, but hey, don't come crying to us when they eff things up.
Now with that disclaimer, I'm going to answer you, Pali, but only because I know you'll just keep asking, And even if you don't get an answer, you'll just go ahead an answer yourself! I'd suggest that there are medications available for this, but I ain't no doctor.
Since you have added a header-home.php to your child theme, you might try adding your widget code into top-bar.php, then changing the reference to point to:
/bp-social-child/lib/templates/wp-template/top-bar.php
or something like that. But like I said, Pali, you really like to complicate things!
Support Kangaroo (joined March 2011) Likes (0)
Greetings Pali Baacsi,
You sir are absolutely hilarious :-) and it is a pleasure having you as a WPMU Dev Member!
Part of the problem I suppose we are facing is that Sarah's post is well over two years old and WordPress has changed drastically since that time.
You may find more satisfaction and accomplish this a bit easier with the Custom Widget Area plugin.
Please let us know how it goes with my suggestion.
Cheers, Joe
Community Engagement (joined April 2010) Likes (0)
Hey Joe,
Thanks for your reply. I know there are plugins out there, but I figured I could waste more time trying to make it work. And I think have it figured out, as I mentioned above. The upside is I understand better now how the theme is put together and even a little more about PHP, so no real loss. Just trading time for knowledge, and how can that be bad, right?
Become a member