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

so I am working with wordpress and I created a calendar with events (custom post_type).I have a page which shows the ca

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744772611a4592852.html

相关推荐

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

    so I am working with wordpress and I created a calendar with events (custom post_type).I have a page which shows the ca

    14小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信