Last active
August 26, 2018 13:25
-
-
Save jesgs/81347658e4cdd186b686011c89a7369b to your computer and use it in GitHub Desktop.
Turn comic image into "next comic" link
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
<?php | |
/** | |
* Pull in options | |
*/ | |
$group_comics = MangaPress_Bootstrap::get_instance()->get_option('basic', 'group_comics'); | |
$group_by_parent = MangaPress_Bootstrap::get_instance()->get_option('basic', 'group_by_parent'); | |
/** | |
* @link https://github.com/mangapress/mangapress/blob/master/includes/functions.php#L234 | |
*/ | |
$next_comic = mangapress_get_adjacent_comic($group_comics, $group_by_parent, 'mangapress_series', '', false); | |
$next_comic_link = get_permalink(get_post_field('ID', $next_comic)); | |
?> | |
<a href="<?php echo esc_url($next_comic_link); ?>"><?php the_post_thumbnail(); ?></a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment