php 如何在创世纪2.0框架中添加后窗口小部件区域 - WordPress提示

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 如何在创世纪2.0框架中添加后窗口小部件区域 - WordPress提示相关的知识,希望对你有一定的参考价值。

/** STEP 1 - Add the after post section */
genesis_register_sidebar( array(
	'id'		=> 'afterpost',
	'name'		=> __( 'After Post  Widget', 'child theme' ),
	'description'	=> __( 'This is the after post section.', 'child theme' ),
) );
 
/** STEP 2 - Add Hook to show widgets after Post Section. */
add_action( 'genesis_entry_footer', 'custom_add_after_post_box', 15 );
function custom_add_after_post_box() {
	if ( is_singular( 'post' ) )
	genesis_widget_area( 'afterpost', array(
		'before' => '<div id="afterpost">',
		 'after'	 => '</div>',
	) );
}

/** NOTE: I added the 'after' div in step 2 */

以上是关于php 如何在创世纪2.0框架中添加后窗口小部件区域 - WordPress提示的主要内容,如果未能解决你的问题,请参考以下文章