admin管理员组文章数量:1404927
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?
本文标签: archivesHow to get post type and monthyear before while loop for datephp file
版权声明:本文标题:archives - How to get post type and monthyear before while loop for date.php file 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744875645a2629899.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论