Mosts StudioPress themes include a after entry widget coded into the child themes functions file.
Generally the widget only displays after single posts.
If you would also like to display exactly the same widget content after single pages, you can modify the code from this:
To this:
The modified code includes a conditional tag with an array for single posts and pages and won’t display on archive pages.
if ( is_singular(array( 'post','page' ) ) )
If you want to create a new widget which displays after all single pages only, grab this code.
Tumikia says
Hi Brad,
I need an additional widget area that works similarly. I need to add an email subscription and style the background color as orange.
I am using the after widget area for videos and the background is black.
What elements of the code do I need to change to get a widget area called “email-subscription” that appears after the entry?
Please advise.
Brad Dalton says
Try this:
Tumikia says
Hi Brad,
Thanks for the help. How do I apply it to pages as well?
Tumikia
Brad Dalton says
Code updated.
Tumikia says
Unfortunately, the widget appears within the content and not after the content like the after-entry widget.
Brad Dalton says
Try the updated code
Tumikia says
Thank you Brad,
I changed this one line of code as instructed: add_action( ‘genesis_entry_footer’,
to add_action( ‘genesis_after_entry’,
It worked perfectly.
Tumikia says
Thanks Brad. It worked perfectly in The 411 Pro theme.