我有一个博客使用wordpress来显示帖子,不是在首页,而是使用一个自定义模板,如http://www.koolkatwebdesigns.com/blog/桌面或非移动。对于手机,我使用的是WPTouch Pro插件和Bauhaus主题,不能只显示页面标题,如下面的截图:

页面-2.php
<?php if ( foundation_is_theme_using_module( 'custom-latest-posts' ) && wptouch_fdn_is_custom_latest_posts_page() ) { ?>
<?php wptouch_fdn_custom_latest_posts_query(); ?>
<?php get_template_part( 'index' ); ?>
<?php } else { ?>
<?php get_header(); ?>
<div id="content">
<?php if ( wptouch_have_posts() ) { ?>
<?php wptouch_the_post(); ?>
<?php get_template_part( 'page-content' ); ?>
<?php } ?>
</div> <!-- content -->
<?php if ( wptouch_fdn_show_comments_on_pages() && ( comments_open() || have_comments() ) ) { ?>
<div id="comments">
<?php comments_template(); ?>
</div>
<?php } ?>
<?php get_footer(); ?>
<?php } ?>我怎么才能修好它?
发布于 2015-12-07 07:34:51
我已经把它修好了,如下所示:
页面-2.php
<?php get_header(); ?>
<h2><a href=”<?php wptouch_the_permalink()?>”><?php wptouch_the_title(); ?></a></h2>
<?php if ( have_posts() ) { wptouch_the_post(); ?>
<div id="content">
<div class="post-content">
<?php query_posts('post_type=post&post_status=publish&posts_per_page=10&paged='. get_query_var('paged')); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'post-loop' ); ?>
<?php endwhile;?>
</div>
</div>
<?php } ?>
<?php wp_reset_query(); ?>
<?php get_footer(); ?>https://stackoverflow.com/questions/34119316
复制相似问题