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.
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.
Try this:
Hi Brad,
Thanks for the help. How do I apply it to pages as well?
Tumikia
Code updated.
Unfortunately, the widget appears within the content and not after the content like the after-entry widget.
Try the updated code
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.
Thanks Brad. It worked perfectly in The 411 Pro theme.