Community Forums › Forums › Archived Forums › Design Tips and Tricks › How To Add Content Above Footer WIDGET Area???
Tagged: genesis_before_footer, priority
- This topic has 9 replies, 2 voices, and was last updated 10 years, 7 months ago by anotherusername.
-
AuthorPosts
-
September 10, 2013 at 8:23 am #61670anotherusernameParticipant
Hi all,
How do you add content above the footer WIDGET area on the home page? (WP 3.6, Genesis 2.0.1, Agency Theme)
I DON'T mean above the FOOTER area.
I mean above the footer WIDGET area. Specifically, the area BELOW the "inner" div but ABOVE the three widgets in columns.
Nick from Studiopress support said that:
"You will have to use the genesis_before_footer hook with a priority of less than 5."
Anyone know how to do that???
He also said that I have to ask that question HERE in the forum (since he said they (studiopress) don't offer support for template changes.
Thanks in advance.
~~~~~
If you aren't sure, then I want to put it above the three columns that say, "Get A Free Tranquility MP3," "Contact US" and "Your Privacy And Rights"
http://www.graceplacewellness.ca/
http://www.graceplacewellness.ca/September 10, 2013 at 8:47 am #61673anotherusernameParticipantTo maybe makes this easier:
What code would I need if I just wanted to move the genesis_before_footer hook so that it appears above the footer widgets?
Thanks.
(Not trying to bump, just that I was too late to edit my original post.)
September 10, 2013 at 10:19 am #61690Brad DaltonParticipantTry this in your child themes functions file
You could also change the div class in the code to the same as any existing widget if you want to style it the same way.
September 10, 2013 at 10:55 am #61696anotherusernameParticipantHi there, Brad:
Thanks so much for the code. It seems to do just what I want!!!
Just in case I decide I DO want to have that new widgetized area on ALL my pages, do I just need to remove the is_home conditional???
Do I just leave the rest the same and change the function before_footer_widget to:
function before_footer_widget() { echo '<div class="before-footer">'; dynamic_sidebar( 'before-footer' ); echo '</div><!-- end #before-footer -->'; }
Or do I need to modify it some other way?
September 10, 2013 at 11:35 am #61713Brad DaltonParticipantHi
Yes. Simply remove the conditional tag:
Pro Tip: If you use the same classes in the widget PHP, you can style your custom widget area the same as any existing element without adding any CSS to your style sheet.
September 10, 2013 at 1:02 pm #61733anotherusernameParticipantThanks again for the assist!!!
September 10, 2013 at 4:34 pm #61798anotherusernameParticipantHi again, Brad:
I just realized that on the Home page the first of the widgets in the footer widget area is NOT showing.
For instance, there is no "Get A Free Tranquility MP3" on the home page here:
http://www.graceplacewellness.ca/
But there is one showing up on other pages:
http://www.graceplacewellness.ca/hypnotherapy-programs/
I still DO have the home page conditional (so that before_footer_widget function is ONLY being called on the home page.
When I look at the source code for where the first footer widget SHOULD be, it is only giving an empty div:
<div class="footer-widgets-1 widget-area"></div>
Any suggestions???
September 10, 2013 at 11:55 pm #61840Brad DaltonParticipantDid you add any CSS code for styling the home page? IT may have something to do with that.
I tested the code and it works.
September 11, 2013 at 9:54 am #61938anotherusernameParticipantBrad:
I am sorry, it looks like it might be something else causing the problem. I just removed that script you gave me and for some reason the problem remains, so I am guessing must be something else.
~~~~ IGNORE THIS PART OF POST BELOW THIS LINE FOR NOW ~~~~~~
Hi there, Brad:
Yes, I have added a bit of CSS code for the home page.
is there something SPECIFIC I should look for in the CSS that might interfere with it working correctly? (It's going to be a little hard for me to undo the CSS changes...)
~~~~
I do think that it probably is NOT related to CSS though, since the content of the first footer widget is not being echoed to the screen at all.
To explain what I mean, on pages OTHER than the home page, here is what is echoed to the screen (when viewing the source code):
<div id="footer-widgets" class="footer-widgets"> <div class="wrap"> <div class="footer-widgets-1 widget-area"> <div id="text-5" class="widget widget_text"> <div class="widget-wrap"> <h4 class="widget-title widgettitle">Get A Free Tranquility MP3</h4> <div class="textwidget">Designed to help you find peace, this free Tranquility MP3 Recorded by Grace Jourbarne is yours for the asking. </div> </div> </div> </div>
However, on the home page, this is what is echoed to the screen:
<div id="footer-widgets" class="footer-widgets"> <div class="wrap"> <div class="footer-widgets-1 widget-area"> </div>
So you can see there is a closing </div> tag right after the opening <div class="footer-widgets-1 widget-area"> .
On the home page, the <div class="widget-wrap"> and the <div class="textwidget"> never even get echoed to the screen.
~~~~
Again, if you think for sure it is a CSS problem, it would be greatly appreciated if you had any guesses what exactly to look for in the CSS.
~~~~ END IGNORE TEXT AREA ~~~~~~
September 11, 2013 at 10:19 am #61948anotherusernameParticipantOk, I'm an idiot...
Forgot that I had installed the widget context plugin and accidentally selected for it NOT to display the footer 1 widget on the home page... Doh!!!
That's what happens when you get "Plugin Fever"
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.