I am trying to create a date.php
file for archives for some custom post types. I am using a while loop to get the posts:
<?php while (have_posts()) : the_post(); ?>
I want to customize the date.php
file such that it caters to the specific post types that the archive page is for e.g. creating page titles such as "Custom Post Type Name Archives".
Is there any function where I can get the post type that the archive is referring to BEFORE the while loop? And also for monthly/ yearly archives, is there any way to get the month/date of the posts before the loop begins?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744875645a4598531.html
评论列表(0条)