Skip to content

Instantly share code, notes, and snippets.

@thecodepoetry
Created December 14, 2020 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thecodepoetry/bb3eb0321ebb32ff17879699822121d9 to your computer and use it in GitHub Desktop.
Save thecodepoetry/bb3eb0321ebb32ff17879699822121d9 to your computer and use it in GitHub Desktop.
Prev next reverse in Album photoscroller
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