In this tutorial, i’ll provide the working code which displays a new widget after any post in any type of archive.
Here’s the screenshot from my local installation of WordPress.
You can easily change the number from 1 for the first post excerpt to any number.
And you can also easily change the conditional tag to suit your own requirements.
The code uses genesis hooks however you can easily change it to something like woo_after or thesis_after. Please check your themes hook reference first.
Hi Brad
Thanks for the code.
I have used it successfully for few months.
But now its giving problem in chrome browser. the ad is overlapping with the excepts. this problem is not happening in mozilla or internet explorer.
2ndly, your site is not visible in india. it shows error “under maintainence”. so i am checking it via proxy.
Thanks for your valuable tutorials and codes.
Regards
Amit
Hi Amit
Support information. http://wpsites.net/registration/
Brad,
I used a slightly modified version of this code to successfully add a widget after the first post excerpt on category pages.
However, I’ve been unable to replicate it to properly create new unique widgets after the second and third excerpts. I was able to create new Widgets #2 and #3, but they all show up right under Widget #1 (i.e., after post excerpt #1 and not after post excerpt #2 and post excerpt #3).
Ideally, I’d like to be able to replicate your code, or use a modified version of it, to create up to about 10 widget sections in the main content area on category pages. Is that possible?
Here’s the code I used. The first widget works properly, but the second and third don’t.
Any help you can provide will be greatly appreciated.
John Huotari
OakRidgeToday.com
Hi John
Try this http://wpsites.net/web-design/add-unique-widgets-after-archive-excerpts/
Thank you, Brad. I’ll take a look, and I very much appreciate it.
John
Thanks for all the help. Works great.
Works well but there is some blank space, how could I get rid of that?
Simply use Firebug to inspect the white space and find the class and change the values for padding and/or margins.
Great stuff, thanks for sharing!
It’s the first time I see this tutorial regarding the Genesis framework…quite good. I remember I asked somebody how do they show content between archive posts and I’ve been told “it’s something custom made”. Glad I found out how to do it.
Hi Bob
You can also use that code on any theme simply by changing the hook from genesis_after_entry to a WordPress hook or a theme specific hook.
Thanks for the comment.