Navigation überspringen

[Closed] Published date isn’t shown on the post types I created

This support ticket is created vor 10 months, 1 week. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Dieses Thema enthält 1 reply, hat 1 Stimme.

Zuletzt aktualisiert von Christopher Amirian vor 10 months, 1 week.

Assistiert von: Christopher Amirian.

Author
Artikel
#2819611

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: versteckter Link
Usual post: versteckter Link

Thanks,
Eloise

#2819654

Christopher Amirian
Unterstützer

Sprachen: Englisch (English )

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.

The topic ‘[Closed] Published date isn’t shown on the post types I created’ is closed to new replies.