psnepsts
Forum Replies Created
-
Thanks so much for the lightning-quick reply! Sorted.
Awesome plugin, Scribu.
Forum: Fixing WordPress
In reply to: get_posts sorting by event date using meta_compareThanks for this. I’ve been looking for this functionality for over a week.
Question:
In what file do you place your code for converting the custom_field data to timestamps?Forum: Fixing WordPress
In reply to: Display future events by querying a Custom Field 'date' entryIt’s been over a week now, and I’m stumped as to how to accomplish this. Seems like a simple thing to do. I’m able to sort by this meta_value, but what I really want to do is display only those that are in the future. In pseudo-code, I want to:
Search all posts with the post type "events" Get the current date Compare it to the date value in "date__time" (custom field) If the value of "date__time" is in the past, do nothing If the value of "date__time" matches the current date, or is in the future, display three of them Sort them from ascending (date closest to today first)
Folks, any help with this would be very much appreciated.
Forum: Fixing WordPress
In reply to: Display future events by querying a Custom Field 'date' entryHey folks,
Still not having any luck with this. Can anyone point me in the right direction?
Forum: Fixing WordPress
In reply to: List Taxonomy Terms specific to a PostThanks, Jackson!
For those who might follow this thread, here’s the updated code, which works perfectly:
<?php $terms = wp_get_post_terms($post->ID,'specialties'); $count = count($terms); if ( $count > 0 ){ echo "<ul>"; foreach ( $terms as $term ) { echo '<li><a href="'.get_term_link($term->slug, 'specialties').'">'. $term->name . "</a></li>"; } echo "</ul>"; }?>
This outputs a list of taxonomy terms to which a post in Custom Post Type is associated.