Home › Forums › Calendar Products › Events Calendar PRO › Display via Custom Meta Field on post or custom post type
- This topic has 2 replies, 3 voices, and was last updated 12 years, 8 months ago by
Barry.
-
AuthorPosts
-
August 17, 2013 at 10:57 pm #60927
calarttech
ParticipantHello Tribe,
I have been doing a lot of work with your plugin recently and I figured out something that I would like to share and something that I am getting caught up on. Any feedback or help would be really appreciated.
I had my client purchase your plugin and for scheduling classes for technical training. I needed something that would work with the custom post types of courses. I realize that ECP makes its own CPT’s but I wanted to have a separation between temporal and “static” content. I then created a custom meta-fields named course ID that both CPT’s could share. I created the variable of $cpt_course_id and passed that in with the $get_posts query, spitting out 3 upcoming courses while on the single courses CPT page.
This is exactly what I need it to be doing with one exception. When I have a recurring event it repeats the same event and dates. For example, if I put a recurring setting on a CCNA course for the dates 15th, 16th, 17th it will just display all dates and permalinks for the course on the 15th.
Here is my code:
‘upcoming’,
‘posts_per_page’=>3,
‘meta_query’ => array(
array(
‘key’ => ‘_ecp_custom_6’,
‘value’ => $cpt_course_id,
)
)
) );foreach($get_posts as $post) { setup_postdata($post); ?>
<a href="” id=”post-“>
<a href="”>ID, true, ‘M j, Y’); ?>Any help or advice is really appreciated.
Thanks!!!
August 20, 2013 at 12:55 pm #61928Rob
MemberHey calarttech. Sorry that this one has slipped through the cracks – it’s on our radar now and I’m committed to helping get it addressed. While this is a bit outside my area of expertise I have it on the list for one of our more dev-minded team members, so we can try to point you in the right direction from there.
We’ll get you a reply in as timely a fashion as possible. Thanks for your support and patience in the interim.
August 28, 2013 at 3:52 pm #63509Barry
MemberHi calarttech – unfortunately this forum isn’t the best at dealing with code – it’s much better to share code by adding it to a service like Gist or Pastebin and dropping the link in here (I suspect we’re missing some of what you wrote, for instance).
However, I suspect you may be using a WordPress API function to retrieve those posts … for events can you instead try using tribe_get_events()? That might help to ensure you get back event posts organized in a more meaningful manner.
Thanks (apologies also for the delay)!
-
AuthorPosts
- The topic ‘Display via Custom Meta Field on post or custom post type’ is closed to new replies.
