wordpress侧边栏如何调用的文章列表,看了很久一直不能理解

WBOY
Release: 2016-06-13 12:32:55
Original
856 people have browsed it

wordpress侧边栏怎么调用的文章列表,看了很久一直不能理解
WordPress 3.7.1简体中文版,wordpress侧边栏怎么调用的文章列表

我下的一个主题中的sidebar.php

<br />
<div id="primary" class="sidebar grid_5 pull_10"><br />
	<ul class=""><br />
	<?php if ( is_active_sidebar( 'sidebartop' ) ) : ?><br />
        <?php dynamic_sidebar( 'sidebartop' ); ?><br />
	<?php endif; // end primary sidebar widgets  ?><br />
	</ul><br />
	<br />
</div><!-- #primary .sidebar --><br />
<br />
<div id="secondary" class="sidebar grid_5 pull_10"><br />
	<ul class=""><br />
	<?php if ( is_active_sidebar( 'sidebarbottom' ) ) : ?><br />
        <?php dynamic_sidebar( 'sidebarbottom' ); ?><br />
	<?php endif; // end secondary sidebar widgets  ?><br />
	</ul><br />
    <br />
</div><!-- #secondary .sidebar --><br />
Copy after login


dynamic_sidebar( 'sidebartop' ) 这个函数调用的最新文章列表?

sidebartop注册是在functions.php中,然后后台才有显示,如下:

register_sidebar(array(<br />
		'name' => 'SidebarTop',<br />
		'description' => 'Top sidebar',<br />
		'id'            => 'sidebartop',<br />
		'before_widget'  =>   "\n\t\t\t" . '<li id="%1$s" class="widget %2$s"><div class="widgetblock">',<br />
		'after_widget'   =>   "\n\t\t\t</div></li>\n",<br />
		'before_title'   =>   "\n\t\t\t\t". '<div class="widgettitleb"><h3 class="widgettitle">',<br />
		'after_title'    =>   "</h3></div>\n" .''<br />
		));<br />
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template