我试图通过以下方式检查wp\\u link\\u页面是否为真:
<?php
the_content();
if( wp_link_pages() ):
?>
<ul class="post-paginate">
<li class="inline-block">
<?php if( !isset( $_GET[\'view\'] ) && $_GET[\'view\'] != \'all\' ) : ?>
<a href="<?php the_permalink(); ?>?view=all" class="dharmagothicc-regular gold">SINGLE PAGE - </a>
<?php endif; ?>
</li>
<li class="inline-block numbers dharmagothicc-regular">
<?php wp_link_pages(array(\'next_or_number\'=>\'number\', \'before\'=>\'\')); ?>
</li>
</ul>
<?php endif; ?>
问题是
wp_link_pages()
返回值两次-即使条件在
if()
陈述
有没有办法逃避这一点?