Last active
March 17, 2016 11:21
-
-
Save s-hiroshi/45a30020d11a55aac642 to your computer and use it in GitHub Desktop.
WordPressシングルページのページングサンプルです。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*doc | |
--- | |
title: Single paging | |
name: single paging | |
category: Default | |
--- | |
This class define single paging in single page. | |
* <- Previous Post | |
* -> Next Post | |
```html_example | |
<div class="single-paging"> | |
<span class="single-paging__previous">← Previous Post</span> | |
<span class="single-paging__next">Next Post →</span> | |
</div> | |
``` | |
*/ | |
.single-paging { | |
overflow: hidden; | |
margin: 1rem 0.5rem; | |
padding: 0.5rem 0.5rem; | |
.single-paging__previous { | |
display: block; | |
float: left; | |
} | |
.single-paging__next { | |
display: block; | |
float: right; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="single-paging"> | |
<span class="single-paging__previous"> | |
<?php previous_post_link( | |
'%link', | |
'← 前の記事' | |
); ?> | |
</span> | |
<span class="single-paging__next"> | |
<?php next_post_link( | |
'%link', | |
'次の記事 →' | |
); ?> | |
</span> | |
</div> | |
<!-- .single-paging --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment