最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

loop - How to only get the content of post page while looping?

programmeradmin0浏览0评论

so I am working with wordpress and I created a calendar with events (custom post_type). I have a page which shows the calendar with all the event dates from this post_type which works fine. Now I want at each of this posts from this post_type this calendar to show up again but this time it should only show the event dates of this specific post.

How would I do that?

so I am working with wordpress and I created a calendar with events (custom post_type). I have a page which shows the calendar with all the event dates from this post_type which works fine. Now I want at each of this posts from this post_type this calendar to show up again but this time it should only show the event dates of this specific post.

How would I do that?

Share Improve this question asked Feb 6, 2020 at 12:54 HorroHorro 1
Add a comment  | 

1 Answer 1

Reset to default 0

Use the the_date() or get_the_date( 'd/m/Y', $post->ID ) functions. This will show only the date of your post type. If you are outside the loop, you need to use the second function I've suggested with the post id passed as param.

发布评论

评论列表(0)

  1. 暂无评论