mattlawck of StudioPress
8/3/2018 - 4:03 PM

Genesis after post widget.

Genesis after post widget.

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

//* Hook after post widget area after post content
add_action( 'genesis_after_post_content', 'sp_after_post_widget' );
	function sp_after_post_widget() {
	if ( is_singular( 'post' ) )
		genesis_widget_area( 'after-post', array(
			'before' => '<div class="after-post widget-area">',
			'after' => '</div>',
	) );
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

//* Hook widget area after post content
genesis_widget_area( 'after-post', array(
	'before' => '<div class="after-post widget-area">',
	'after' => '</div>',
) );
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

//* Register after post widget area
genesis_register_sidebar( array(
	'id'            => 'after-post',
	'name'          => __( 'After Post', 'themename' ),
	'description'   => __( 'This is a widget area that can be placed after the post', 'themename' ),
) );