Community Forums › Forums › Archived Forums › Design Tips and Tricks › Divine – After-entry widget doesn't display on custom post types
Tagged: after entry widget, custom post types, Divine
- This topic has 3 replies, 3 voices, and was last updated 8 years, 9 months ago by Brad Dalton.
-
AuthorPosts
-
December 28, 2015 at 1:12 pm #174966acleanplateMember
Hello!
The After-Entry Widget does not display on custom post types ("recipes") which are created using the plugin WP Ultimate Recipe. I know this is a very simple fix and just need to know which file to edit and what code to drop in to get the widget to display on recipe-type posts.
I have been through Divine's support but have not received a helpful response.
TIA!
website: http://acleanplate.com
http://acleanplate.com
default post type with after-entry widget: http://www.acleanplate.com/2015/12/23/complete-guide-paleo-pantry-items/
recipe post type without the widget: http://www.acleanplate.com/recipe/balsamic-watermelon-slushie/December 28, 2015 at 2:00 pm #174970SusanModeratorI have been through Divine’s support but have not received a helpful response.
You haven't indicated what the response you received was, but it's probably because the question you are asking is not a theme support question, it's a customization question. The third party theme developers (just like StudioPress) provide theme support, not customization assistance.
Try this tutorial by Carrie Dils: http://www.carriedils.com/after-entry-widget/ which discusses specifically adding the widget to custom post types.
December 28, 2015 at 5:48 pm #174985acleanplateMemberThank you, Susan! That is exactly what I needed. In case anyone else runs into a similar issue, here is the code I dropped into my functions.php file:
//* Register widget areas genesis_register_sidebar( array( 'id' => 'after-entry', 'name' => __( 'After Entry', 'theme-prefix' ), 'description' => __( 'This is the after entry section.', 'theme-prefix' ), ) ); //* Hooks after-entry widget area to single posts add_action( 'genesis_entry_footer', 'my_after_entry_widget' ); function my_after_entry_widget() { if ( ! is_singular( 'recipe' ) ) return; genesis_widget_area( 'after-entry', array( 'before' => '<div class="after-entry widget-area"><div class="wrap">', 'after' => '</div></div>', ) ); }
Where 'recipe' is the custom post type that was previously not displaying the after-entry widget.
What I wanted to know from Divine's support was where the after-entry widget area code like Carrie provides is located in their php files, because I thought all I would have to do is add is_singular( 'recipe') somewhere in the theme. Their answer was that I could hire them to do it for $50, but this really should have been a five-minute fix with no sweat if I'd just known up front which file I had to edit.
Thanks again, Susan!
December 28, 2015 at 5:53 pm #174986Brad DaltonParticipantPlease note that our support team is here to help answer questions pertaining to any Restored 316 theme
setup and installation. Any further customizations to themes is not covered under our provided support.Source http://restored316designs.com/support/
One thing cdils post doesn't cover is using the after entry widget on both single posts and a custom post type.
To do this, you'll need to use an array with the conditional tag like this:
if ( is_singular(array('post','recipes')))
-
AuthorPosts
- The topic ‘Divine – After-entry widget doesn't display on custom post types’ is closed to new replies.