Custom Field Date Problem

I agree with Denis, I don’t like using custom fields for this kind of stuff, but I’m not aware of any other way yet… What you what can be done by altering the SQL query for the loop, something like this: add_filter(‘posts_join’, ‘my_post_filter_join’); function my_post_filter_join($join) { global $wpdb; if(is_home() || is_category() || is_search()) $join .= … Read more

Post navigation using date

If you’re trying to navigate between posts in the same category, would next_post_link()/previous_post_link() work for you? These functions have an $in_same_cat argument, that would appear to suit your needs? EDIT: Here is a Plugin, WP Category Archives, that might point you in the right direction? It purports to display: …a monthly or yearly archive of … Read more

wp_dropdown_categories by date?

I have a fancy function that i made just for that: <?php /* Create taxomony term list of posts based on given year * * @param $year – (int) 4 digits – the year to return the list of. required * * @param $taxonomy – (string) the taxonomy name of which the retreve the terms. … Read more

Timed post and tweet?

WordPress doesn’t have “tweeting” functionality built in. However, post scheduling is built in. You just set the time when you want the post to publish on the edit post screen. If you use a twitter plugin like my own Simple Twitter Connect, and you schedule a post, then it will send the tweet at the … Read more

Display upcoming events in the next 30 days by querying posts with timestamp in custom meta

I recently did exactly the same, you’ll have to use custom query: $date = time()-86400; /* today */ $querystr = ” SELECT $wpdb->posts.* FROM $wpdb->posts, $wpdb->postmeta WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->posts.post_status=”publish” AND $wpdb->postmeta.meta_key = ‘event_date’ AND $wpdb->postmeta.meta_value > ” . $date . ” ORDER BY $wpdb->postmeta.meta_value ASC “; $pageposts = $wpdb->get_results($querystr, OBJECT); foreach ($pageposts … Read more

PHP time function ($today) for GMT +1

Time is one of the things in environment WordPress normalizes to GMT, so all native PHP function give that in WordPress context. To get time in timezone, set in WordPress settings, try date_i18n() instead.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)