function micronav() { wp_reset_postdata(); $is_post = is_single() && !is_attachment() && !wallow_is_allcat(); $is_archive = (is_archive() || is_search() || is_home()) && !wallow_is_allcat(); if ($is_post) { $next = get_next_post() ? '<a title="' . esc_attr(sprintf(__('Next Post', 'wallow') . ': %s', get_the_title(get_next_post()))) . '" href="' . esc_url(get_permalink(get_next_post())) . '"> </a>' : ''; $prev = get_previous_post() ? '<a title="' . esc_attr(sprintf(__('Previous Post', 'wallow') . ': %s', get_the_title(get_previous_post()))) . '" href="' . esc_url(get_permalink(get_previous_post())) . '"> </a>' : ''; } elseif ($is_archive) { $prev = get_next_posts_link() ? get_next_posts_link(' ') : ''; $next = get_previous_posts_link() ? get_previous_posts_link(' ') : ''; } else { $next = ''; $prev = ''; } ?> <div id="micronav"> <div class="next archive-navigation"><?php echo $next; ?> </div> <div class="prev archive-navigation"><?php echo $prev; ?> </div> <div class="home"><a title="<?php esc_attr_e('Home', 'wallow'); ?> " href="<?php echo esc_url(home_url()); ?> "> </a></div> <div class="up"><a title="<?php esc_attr_e('Top', 'wallow'); ?> " href="#"> </a></div> <div class="down"><a title="<?php esc_attr_e('Bottom', 'wallow'); ?> " href="#credits"> </a></div> </div> <?php }
function wallow_allcat() { if (wallow_is_allcat()) { get_template_part('allcat'); exit; } }