首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用WPTouch Pro插件设置自定义posts页面

问如何使用WPTouch Pro插件设置自定义posts页面
EN

Stack Overflow用户
提问于 2015-12-06 15:46:55
回答 1查看 484关注 0票数 1

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

​

​

页面-2.php

代码语言:javascript
复制
<?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 } ?>

我怎么才能修好它?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-12-07 07:34:51

我已经把它修好了,如下所示:

页面-2.php

代码语言:javascript
复制
<?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(); ?>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34119316

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档