Created
December 14, 2020 10:25
-
-
Save thecodepoetry/bb3eb0321ebb32ff17879699822121d9 to your computer and use it in GitHub Desktop.
Prev next reverse in Album photoscroller
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
function presscore_get_previous_post_link( $link_text = '', $link_class = '', $dummy = '' ) { | |
$post_link = get_next_post_link( '%link', $link_text ); | |
if ( $post_link ) { | |
return str_replace( 'href=', 'class="'. esc_attr( $link_class ) . '" href=', $post_link ); | |
} | |
return $dummy; | |
} | |
function presscore_get_next_post_link( $link_text = '', $link_class = '', $dummy = '' ) { | |
$post_link = get_previous_post_link( '%link', $link_text ); | |
if ( $post_link ) { | |
return str_replace( 'href=', 'class="'. esc_attr( $link_class ) . '" href=', $post_link ); | |
} | |
return $dummy; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment