<?php
/**
 * Template Name: Latest Manga Series Page
 *
 * This is a page template you can use for the latest manga series page
 *
 * @package Toocheke
 */
// Get layout and determine if it's traditional

$args = [
    'posts_per_page' => '1',
    'post_type'      => 'manga_series',
    'order'          => 'DESC',

];

$manga_series_posts = get_posts($args);
if ($manga_series_posts) {
    $url = get_permalink($manga_series_posts[0]->ID);

    wp_redirect($url, 301);
    exit;
}
