Support » Themes and Templates » What conditional can I use to hide the navigation CSS?

  • The theory: This is on my index.php page:

    <!-- WP-PageNavi -->
    <?php if (function_exists('wp_pagenavi')) : ?>
    <div class="pagenav-alt">
    <?php wp_pagenavi(); ?>
    </div>
    <?php else : ?>

    <div class="pagenav">
    <div class="alignleft"><?php posts_nav_link('', __(''), __('&laquo; Previous entries')); ?></div>
    <?php // posts_nav_link(' · ', __(''), __('')); ?>
    <div class="alignright"><?php posts_nav_link('', __('Next entries &raquo;'), __('')); ?></div>
    </div>

    <?php endif; ?>

    As you can see there’s a conditional for WP PageNavi, but that’s not the issue.

    The problem is that, when a page that doesn’t have enough posts is loaded, the CSS still displays, and it’s visible.

    How can I fix this?

  • The topic ‘What conditional can I use to hide the navigation CSS?’ is closed to new replies.