• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Add Genesis After Entry Widget Area To Single Pages

By default the after entry widget area coded in genesis only displays on single posts.

To enable this widget area on single pages, you’ll need to add support using add_post_type_support in your child themes functions file.

Code Installation #

Add the following PHP code to the end of your child themes functions file.

add_post_type_support( 'page', 'genesis-after-entry-widget-area' );

You could also add the widget area to custom post types like this :

add_post_type_support( 'portfolio', 'genesis-after-entry-widget-area' );

Adds the after entry widget area to single portfolio items for the portfolio custom post type.

Here’s another way to write the code :

add_action( 'init', 'portfolio_after_entry_widget' );

function portfolio_after_entry_widget() {

	if ( current_theme_supports( 'genesis-after-entry-widget-area' ) ) {
	
	$type = 'portfolio';
	
	add_post_type_support( $type, 'genesis-after-entry-widget-area' );
	
	}
	
}

Related Tutorials

  • Add After Single Post Entry Widget To Single Pages

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems