Hello,
I have created post types, and the published date at the top of the post isn't showing like it is showing on my "usual" posts. How do I add it?
Custom post: hidden link
Usual post: hidden link
Thanks,
Eloise
Hi Eloise — this is just a template thing 🙂
Most themes print the date only for the built-in Posts. Your Tips custom post type uses a different single template, so the theme isn’t outputting the date there. You can add it with Toolset in a minute:
1- Add the date in your CPT’s single template (Toolset)
2- Insert a Fields and Text block and add the shortcode:
Published on [wpv-post-date format="F j, Y"]
3- Save and assign this template to the Tips CPT if it isn’t already.
----------
If you’re relying on the theme’s PHP template for the CPT, add something like:
echo get_the_date('F j, Y');
to single-tips.php (or wherever your CPT’s single template outputs the header).
Thanks.