首页 文章

如何使用WPTouch Pro插件设置自定义帖子页面

提问于
浏览
1

我有一个博客使用wordpress显示不在首页上的帖子,但使用自定义模板,如http://www.koolkatwebdesigns.com/blog/用于桌面或非移动 . 对于移动我使用WPTouch Pro Plugin与包豪斯主题无法显示帖子只显示页面 Headers 如下截图:

sswp

page-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 } ?>

我怎么解决它?

1 回答

  • 0

    我已经自己修好了,如下所示:

    page-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(); ?>
    

相关问题