Permalink
Browse files

Changed post and page navigation to <nav> elements

  • Loading branch information...
splorp committed Jun 13, 2014
1 parent daa184b commit 493a84d0880a5b4b9a83646aa606f42457f419bb
Showing with 15 additions and 15 deletions.
  1. +2 −2 archive.php
  2. +2 −2 category.php
  3. +2 −2 comments.php
  4. +2 −2 image.php
  5. +1 −1 index.php
  6. +2 −2 search.php
  7. +2 −2 single.php
  8. +2 −2 tag.php
View
@@ -26,7 +26,7 @@
<?php } ?>
<?php if (show_posts_link_nav()): ?>
- <p><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></p>
+ <nav><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></nav>

This comment has been minimized.

Show comment
Hide comment
@cdharrison

cdharrison Jun 13, 2014

Collaborator

Good call.

@cdharrison

cdharrison Jun 13, 2014

Collaborator

Good call.

This comment has been minimized.

Show comment
Hide comment
@splorp

splorp Jun 14, 2014

Owner

It also makes these links a bit easier to style without adding a class.

I’m currently using the rel attribute as a selector to style the links like buttons in the splorp child theme, but the *_posts_link, *_image_link, and *_comments_link functions don’t include rel or title attributes like the *_post_link functions do.

@splorp

splorp Jun 14, 2014

Owner

It also makes these links a bit easier to style without adding a class.

I’m currently using the rel attribute as a selector to style the links like buttons in the splorp child theme, but the *_posts_link, *_image_link, and *_comments_link functions don’t include rel or title attributes like the *_post_link functions do.

<?php endif; ?>
<?php while (have_posts()) : the_post(); ?>
@@ -42,7 +42,7 @@
<?php endwhile; ?>
<?php if (show_posts_link_nav()): ?>
- <p><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></p>
+ <nav><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></nav>
<?php endif; ?>
<?php else :
View
@@ -26,7 +26,7 @@
?>
<?php if (show_posts_link_nav()): ?>
- <p><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></p>
+ <nav><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></nav>
<?php endif; ?>
<?php
@@ -45,7 +45,7 @@
<?php endwhile; ?>
<?php if (show_posts_link_nav()): ?>
- <p><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></p>
+ <nav><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></nav>
<?php endif; ?>
<?php else : ?>
View
@@ -17,15 +17,15 @@
<h3><?php comments_number('No Comments', 'One comment', '% comments' );?> on &#8220;<?php the_title(); ?>&#8221;</h3>
<?php if (show_comments_link_nav()): ?>
- <p><?php previous_comments_link('Older'); delim_comment_link(); next_comments_link('Newer') ?></p>
+ <nav><?php previous_comments_link('Older'); delim_comment_link(); next_comments_link('Newer') ?></nav>
<?php endif; ?>
<ol>
<?php wp_list_comments('type=comment&callback=tersus_comment'); ?>
</ol>
<?php if (show_comments_link_nav()): ?>
- <p><?php previous_comments_link('Older'); delim_comment_link(); next_comments_link('Newer') ?></p>
+ <nav><?php previous_comments_link('Older'); delim_comment_link(); next_comments_link('Newer') ?></nav>
<?php endif; ?>
<?php else : // No comments posted
View
@@ -14,7 +14,7 @@
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if (show_image_link_nav()): ?>
- <p><?php previous_image_link(0,'Previous Image'); delim_image_link(); next_image_link(0,'Next Image'); ?></p>
+ <nav><?php previous_image_link(0,'Previous Image'); delim_image_link(); next_image_link(0,'Next Image'); ?></nav>
<?php endif; ?>
<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
@@ -50,7 +50,7 @@
</article>
<?php if (show_image_link_nav()): ?>
- <p><?php previous_image_link(0,'Previous Image'); delim_image_link(); next_image_link(0,'Next Image'); ?></p>
+ <nav><?php previous_image_link(0,'Previous Image'); delim_image_link(); next_image_link(0,'Next Image'); ?></nav>
<?php endif; ?>
<?php comments_template(); ?>
View
@@ -45,7 +45,7 @@
<?php endwhile; ?>
<?php if (show_posts_link_nav()): ?>
- <p><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></p>
+ <nav><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></nav>
<?php endif; ?>
<?php else : ?>
View
@@ -13,7 +13,7 @@
<h2>Search: &#8220;<span><?php the_search_query(); ?></span>&#8221;</h2>
<?php if (show_posts_link_nav()): ?>
- <p><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></p>
+ <nav><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></nav>
<?php endif; ?>
<?php while (have_posts()) : the_post(); ?>
@@ -29,7 +29,7 @@
<?php endwhile; ?>
<?php if (show_posts_link_nav()): ?>
- <p><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></p>
+ <nav><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></nav>
<?php endif; ?>
<?php else : ?>
View
@@ -11,7 +11,7 @@
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if (show_post_link_nav()): ?>
- <p><?php previous_post_link('%link'); delim_post_link(); next_post_link('%link') ?></p>
+ <nav><?php previous_post_link('%link'); delim_post_link(); next_post_link('%link') ?></nav>
<?php endif; ?>
<article <?php post_class() ?> id="post-<?php the_ID(); ?>">
@@ -46,7 +46,7 @@
</article>
<?php if (show_post_link_nav()): ?>
- <p><?php previous_post_link('%link'); delim_post_link(); next_post_link('%link') ?></p>
+ <nav><?php previous_post_link('%link'); delim_post_link(); next_post_link('%link') ?></nav>
<?php endif; ?>
<?php comments_template(); ?>
View
@@ -12,7 +12,7 @@
<h2><?php printf( 'Tag: %s' , '<span>' . single_tag_title( '', false ) . '</span>' ); ?></h2>
<?php if (show_posts_link_nav()): ?>
- <p><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></p>
+ <nav><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></nav>
<?php endif; ?>
<?php
@@ -35,7 +35,7 @@
<?php endwhile; ?>
<?php if (show_posts_link_nav()): ?>
- <p><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></p>
+ <nav><?php next_posts_link('Older'); delim_posts_link(); previous_posts_link('Newer') ?></nav>
<?php endif; ?>
<?php else : ?>

0 comments on commit 493a84d

Please sign in to comment.