dongxi0523 2015-02-19 13:56
浏览 45

Wordpress posts_nav_link问题

I have a blog.php with the following code:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
        <h1>
        <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
            <?php the_title(); ?>
        </a>
        </h1>
    <section>
        <h3><?php the_category(); ?></h3>
        <h5><?php the_date(); ?></h5>
        <h5><?php posts_nav_link(); ?></h5>
    </section>
    <p class="articlemeta center"></p>
        <?php if ( has_post_thumbnail() ) { the_post_thumbnail();} ?>
        <?php the_content(); ?>
        <?php edit_post_link( 'bearbeiten' ); ?>
        <?php posts_nav_link(); ?>
        <?php endwhile; else: ?>
    <h2> 
        Sorry noch keine Texte vorhanden
    </h2>
    <section class="entry-utility">
            <?php $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list ):?>
        <span class="tag-links"> 
            <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> 
        </span> 
        <span class="meta-sep">|</span>
        <?php endif; ?>
    </section>
<?php endif; ?>

My issue is now, that the dont compute a navigation. There is also no navigation when i paste the code at any other destination of the code. I hope anyone could help me to fix my issue.

Many thanks in advance.

  • 写回答

1条回答 默认 最新

  • dragon4587 2015-02-19 19:17
    关注

    I noticed you call <?php posts_nav_link(); ?> twice. I am not sure if this is an error because I don't have much to work with here.

    I would take a look at the Wordpress Codex for guidance. An example they provide that might help is:

    <div style="text-align:center;">
        <?php posts_nav_link( ' &#183; ', 'previous page', 'next page' ); ?>
    </div>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探