Standard API for rendering a date form

Could this work for you? <link type=”text/css” href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css” rel=”stylesheet” /> <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js”></script> <script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js”></script> <script type=”text/javascript”> $(document).ready(function(){ $(“#datepicker”).datepicker({ onSelect: function(dateText, inst) { $(“#thedate”).val(dateText); } }); }); </script> <table> <tr> <td style=”vertical-align:top;”> <h3>End Date</h3> </td> <td> <ul> <li><p>(Pick a date from the calendar below)</p></li> <li> <div style=”margin-bottom:5px;” type=”text” id=”datepicker”></div> </li> <li> Date Selected: <input … Read more

Adding a class to last post in the_date

Its possible, you can get the next post date to compare using get_adjacent_post function change your code to this: <?php while ( have_posts() ) : the_post(); //hold current date $curent_date = $post->post_date; //fix the format to YYYY-MM-DD $curent_date = substr($curent_date,0,strpos($curent_date,” “)); $next_post = get_adjacent_post(false,”,false) ; if (!$next_post == ”){ //get next post’s date $next_date = … Read more

Query sub subpages based on specific date?

If you’re loading additional posts/pages, it’s better to use a new WP_Query instance. query_posts is only for modifying the main query. As for the dates, store them in a custom field in the format yyyy-mm-dd. You’ll use php’s date to get the current date, refer to WP_Query’s custom field parameters for how to query and … Read more

Comment time is same as the post time

Try to use the wp_list_comments function: http://codex.wordpress.org/Function_Reference/wp_list_comments It allows you to control the aspect of every comment, also the replies. Then, you define a callback function, which will be called when WordPress creates each comment. Your callback needs to start like this: function commnents_callback($comment, $args, $depth) { $GLOBALS[‘comment’] = $comment; global $post; // your HTML … Read more

Change the counter in terms of date

Hope these plugins will be helpful http://wordpress.org/extend/plugins/date-in-a-nice-tone/ http://wordpress.org/extend/plugins/wp-relativedate http://www.jasonhendriks.com/programmer/dynamic-dates/dynamic-dates-examples/

Replicate the_date function when using a custom field

You can use date_query with is very usefull. In this snipet we get a week most viewed posts. <?php $args = array( ‘date_query’ => array( array( ‘year’ => date(‘Y’), ‘week’ => date(‘W’), ), ), ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘meta_key’ => ‘post_views_count’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘DESC’, ‘showposts’ => ‘5’ ); $my_query = … Read more

Block post updates and deletion after a set period

From the PHP manual acceptable units for strtotime() are: unit ((‘sec’ | ‘second’ | ‘min’ | ‘minute’ | ‘hour’ | ‘day’ | ‘fortnight’ | ‘forthnight’ | ‘month’ | ‘year’) ‘s’?) | ‘weeks’ | daytext Try using -300 second (not seconds).