Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to add an WIDGET area just below article?
Tagged: Add Widget, widget area
- This topic has 4 replies, 2 voices, and was last updated 11 years, 6 months ago by Brad Dalton.
-
AuthorPosts
-
February 15, 2013 at 11:09 am #20534NanditaMember
My blog URL is http://99clicks.net
I want to add an widget area just below the article (Strictly below the article, means - just above the "Related Posts" in my blog posts)
I followed the post of Brian Gardner on this link and my blog crashed immediately http://www.briangardner.com/code/add-after-post-widget/
TIME for you to CHANGE: Not only me, lots of other bloggers also faced the same consequence after adding this piece of code (by Brian Gardner Post). I learned this thing after going through different threads on this forum related to adding widget area.
I'm surprised, how you have not noticed this serious issue of Crashing of blogs (bloggers who don't know a single piece of code, and FTP is far away for them) after such a log time? (lots of bloggers also complaint about this in the forum). If this piece of code is not working, kindly consider modifying it or completely removing it.
Then I followed the link and able to succeed but PARTIALLY http://designsbynickthegeek.com/tutorials/add-widgeted-sidebar
If I want to add the widget after the article doesn't mean it should be at the end of content, after the comments XXXXX
The widget area should be just below the article. And on my blog it is just above the Related Post area.
Can you pls hep me to achieve this customization?
Thanks.
February 15, 2013 at 11:36 am #20542Brad DaltonParticipantIt might have been caused when copying and pasting code as i have used that code and it works.
Based on this visual hook map, which hook is in the location you want your widget?
Once you have that worked out, simply change the hook from this genesis_after_content_sidebar_wrap to the hook you want to use in this code.
add_action( 'genesis_after_content_sidebar_wrap', 'child_after_content_ad_sidebar' ); /** Loads a new sidebar after the content */ function child_after_content_ad_sidebar() { echo '<div class="after-content-ad">'; dynamic_sidebar( 'after-content-ad' ); echo '</div>'; }
Another option is to install the Genesis Simple Hooks plugin and use the code from the tutorial you linked to above in the correct hook location.
February 15, 2013 at 12:37 pm #20554NanditaMemberHi Brad,
It's not working - neither the plugin is compatible with my version (after installing), nor the code you have mentioned helped me.
I simply want to add a widget area just after the last line of my every blog posts (articles). That's all!
Which pieces of codes I should add to my functions.php file?
Hope you help me 🙂
February 15, 2013 at 8:27 pm #20625NanditaMemberStill not able to figure-out the solution, crashing my theme (site) 'N' number of time.
Hope you will provide me the right code to add for my above need.
Thanks.
February 15, 2013 at 11:54 pm #20643Brad DaltonParticipantTHis code has been written by the founder of StudioPress http://www.briangardner.com/code/add-after-post-widget/
Sorry to see you're having problems however you have been provided code which has been tested and works.
You need to paste the correct code in the right location or it won't work.
Make sure you remove all the old code before adding the new block.
You could also install WordPress locally and test the code locally so you can learn more about the basics of PHP coding.
Hope you can get it working.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.