编辑“WordPress模板主题”
该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。
最后版本 | 您的文本 | ||
第1行: | 第1行: | ||
<span style="border:1px solid #000; text-align:center; float:right; padding:6px;"><strong>导航:</strong> [[WordPress布局和设计FAQ|上一页]] | {{Template:WordPress导航}}</span> | <span style="border:1px solid #000; text-align:center; float:right; padding:6px;"><strong>导航:</strong> [[WordPress布局和设计FAQ|上一页]] | {{Template:WordPress导航}}</span> | ||
<div style="clear:both;"></div> | <div style="clear:both;"></div> | ||
<STRONG>为什么我只能在[[博客]]上看到几篇日志,其它的都到哪儿去了?</STRONG> | <STRONG>为什么我只能在[[博客]]上看到几篇日志,其它的都到哪儿去了?</STRONG> | ||
第37行: | 第36行: | ||
与Page Links To功能相似的插件还包括: | 与Page Links To功能相似的插件还包括: | ||
*http://svn.redalt.com/projects/Redirectify/trunk/redirectify.php | *http://svn.redalt.com/projects/Redirectify/trunk/redirectify.php | ||
*http://wordpress.org/extend/plugins/redirect/ | *http://wordpress.org/extend/plugins/redirect/ http://wordpress.org/extend/plugins/redirect/ | ||
参见: | 参见: | ||
第51行: | 第50行: | ||
1.新建一个文件并命名为<EM>wp-content/themes/default/pageofposts.php</EM>,文件中应包括以下内容:<BR> | 1.新建一个文件并命名为<EM>wp-content/themes/default/pageofposts.php</EM>,文件中应包括以下内容:<BR> | ||
<?php | |||
/* | |||
Template Name: PageOfPosts | |||
*/ | |||
get_header(); ?> | get_header(); ?> | ||
< div id="content" class="narrowcolumn"> | < div id="content" class="narrowcolumn"> | ||
第65行: | 第64行: | ||
<?php if( $my_query->have_posts() ) : ?> | <?php if( $my_query->have_posts() ) : ?> | ||
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?> | <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> | ||
<?php | |||
//necessary to show the tags | |||
global $wp_query; | |||
$wp_query->in_the_loop = true; | |||
?> | |||
< div <?php post_class() ?> id="post-<?php the_ID(); ?>"> | |||
< h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"> | |||
<?php the_title(); ?></a></h2> | |||
< small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> | |||
< div class="entry"><?php the_content('Read the rest of this entry »'); ?></div> | |||
< p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> | |||
Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> | |||
<?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> | |||
</div> | |||
<?php endwhile; ?> | <?php endwhile; ?> | ||
< div class="navigation"> | < div class="navigation"> | ||
第89行: | 第88行: | ||
<?php get_search_form(); ?> | <?php get_search_form(); ?> | ||
<?php endif; ?> | <?php endif; ?> | ||
</div> | |||
<?php get_sidebar(); ?> | |||
<?php get_footer(); ?> | |||
2. 在管理面板>页面>添加新页面中,新建一个页面并命名,在模板字段中选择PageOfPosts。 | 2. 在管理面板>页面>添加新页面中,新建一个页面并命名,在模板字段中选择PageOfPosts。 | ||