Forum Replies Created
-
AuthorPosts
-
murphy1976
MemberI would LOVE to see a linked category listing for the mini calendar so that you could toggle off and on different categories along with seeing ALL CATEGORIES as a default. You can currently get this to work for the full calendar view, but not the mini-calendar.
A perfect example of this functionality can be seen with this calendar plugin:
http://wordpress.org/extend/plugins/ajax-event-calendar/murphy1976
MemberHUZZAH!
I have figured out the answer to my own question. It’s a make-shift answer, BUT an answer nonetheless.
What I wanted to do was to have a special div only appear when there was an event that was occurring TODAY.
After hours of searching the internet and conversing with the boys over at Stackoverflow.com, I was able to come up with the solution:
I placed this custom WP_Query in my header.php (where the DIV actually is):
get_results(
"
SELECT $wpdb->posts.*
FROM $wpdb->posts, $wpdb->postmeta
WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id
AND $wpdb->postmeta.meta_key = '_EventStartDate'
AND $wpdb->postmeta.meta_value BETWEEN TIMESTAMP(CURDATE()) AND DATE_ADD(TIMESTAMP(CURDATE()), INTERVAL 86399 SECOND)
AND $wpdb->posts.post_type = 'tribe_events'
AND $wpdb->posts.post_status = 'publish'
ORDER BY $wpdb->posts.post_title
");if ($todaysEvents):
?><?php foreach ( $todaysEvents as $tE ) {
<a href="guid ?>">post_title ?>
The WP_Query selects ONLY those entrants into the database that match the following criteria: Both in POSTS & POSTMETA, POSTMETA_KEY = “EVENTSTARTDATE”, POSTMETAVALUE = TODAY from Midnight to 11:59:59PM, POST_TYPE are “Tribe_EVENTS” and POSTS are published
I then put this into a foreach loop and caled the post’s guid for the link and the post_title for the title… and BOO-YA-SHA-KAH!
Not bad for a designer…
murphy1976
MemberAwesome… thanks and Merry Christmas if no one gets back to me by week’s end.
murphy1976
MemberWell I figured since y’all are Modern Tribe… Tribal Council seemed appropriate… HA HA.
-
AuthorPosts
