php 帖子后的创世纪盒子。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 帖子后的创世纪盒子。相关的知识,希望对你有一定的参考价值。

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
 
//* Hook Genesis box widget area after post content
add_action( 'genesis_entry_footer', 'sp_genesis_box', 9 );
	function sp_genesis_box() {
	if ( is_singular( 'post' ) )
		genesis_widget_area( 'after-post', array(
			'before' => '<div class="genesis-box widget-area">',
			'after' => '</div>',
	) );
}
<div class="genesis-box">
	<h4>YourDomain.com runs on the Genesis Framework</h4>
	<a href="AFFILIATE LINK GOES HERE"><img class="alignright" src="IMAGE URL GOES HERE" alt="Genesis Framework" title="Check out the Genesis Framework" /></a>
	<p>Genesis empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go. It's that simple - start using <a href="AFFILIATE LINK GOES HERE">Genesis</a> now!</p>
	<p>Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your site look the way you want it to.  With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.</p>
</div>
/* Genesis Box
--------------------------------------------- */
 
.genesis-box {
	background: #f5f5f5;
	border: 1px solid #ddd;
	margin-top: 20px;
	padding: 20px;
}
     
.genesis-box h4 {
	font-size: 18px;
	font-weight: normal;
	margin-bottom: 10px
	padding: 0;
	text-transform: none;
}
     
.genesis-box .alignright {
	background: #fff;
	border: 1px solid #ddd;
	float: right;
	margin: 0 0 5px 10px;
	padding: 7px;
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
 
//* Register Genesis box widget area
genesis_register_sidebar( array(
	'id'            => 'after-post',
	'name'          => __( 'Genesis Box', 'themename' ),
	'description'   => __( 'This is a widget area that can be placed after the post', 'themename' ),
) );

以上是关于php 帖子后的创世纪盒子。的主要内容,如果未能解决你的问题,请参考以下文章

php 创世纪没有帖子输出

php 后小部件后的创世纪。

PHP 在主页后的页面上显示额外的帖子

css 在创世纪中用砌体风格的WP相关帖子显示相关内容

php + ajax实现 帖子点赞功能

php [创世纪空白内容]创世纪修复空白内容#wordpress