Updated on October 15, 2020
This members-only tutorial provides the steps to add previous and next post links on single post pages in Oxygen.
Edit your Oxygen template for single blog posts.
Add a Section where you want the previous and next post links to appear.
Add a Columns element with 50 50 column layout.
Add a Code Block element in the left column having:
<?php
if ( get_previous_post_link() ) {
previous_post_link();
}
?>
Add a Code Block element in the right column having:
<?php
if ( get_next_post_link() ) {
next_post_link();
}
?>
Select the right column div and set Right horizontal item alignment.
In Step 2 above change
<?php
if ( get_previous_post_link() ) {
previous_post_link();
}
?>
to
<?php
if ( get_previous_post_link() ) {
previous_post_link( '« %link', '%title', true, '', 'category' );
}
?>
and
<?php
if ( get_next_post_link() ) {
next_post_link();
}
?>
to
<?php
if ( get_next_post_link() ) {
next_post_link( '« %link', '%title', true, '', 'category' );
}
?>
Reference: https://codex.wordpress.org/Function_Reference/previous_post_link
Session expired
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.