Create a list of months based posts
Try This <a href=”https://wordpress.stackexchange.com/2016/8/?post_type=post”>August</a> <a href=”http://wordpress.stackexchange.com/2016/7/?post_type=post”>July</a>
Try This <a href=”https://wordpress.stackexchange.com/2016/8/?post_type=post”>August</a> <a href=”http://wordpress.stackexchange.com/2016/7/?post_type=post”>July</a>
You can use PHP’s date() function here, but usually first you’ll need to run date_default_timezone_set. UTC+1 looks like Central Europe time from what I can tell, so here’s what I’d run: <?php date_default_timezone_set(‘Europe/Berlin’); echo date( ‘D, d M Y H:i:s’, now() ); ?> That will print out the current time from your server. If you’re … Read more
Here is my solution, which has been tested and works: // Timestamp to format (defaults to current time) $timestamp = time(); // Set language code $dateformat = new IntlDateFormatter( ‘fr_FR’, // Use valid Locale format IntlDateFormatter::LONG, IntlDateFormatter::NONE ); // Set date format $dateformat->setPattern(‘MMMM’); // Echo (and capitalize) formatted timestamp echo ucfirst( $dateformat->format( $timestamp ) ); … Read more
That’s because you overrule the query. You have to put the original info into the query_posts like so: <?php global $query_string; query_posts($query_string . ‘posts_per_page=10&paged=’.$paged); ?> For more info look here: http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note
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
Sure, you can do something like this in your template code: <?php $migrate_date = mktime(0,0,0,1,1,2012); if ( get_the_date(‘U’) > date(‘U’, $migrate_date) ) { echo “<p>New</p>\n”; } else { echo “<p>Old</p>\n”; } ?>
You’d need to set up an additional custom field and update it whenever the user changes or updates the original custom field.
It looks more like a SQL injection attack. The ‘/0–+-(( +):(*:*- part that is…
Here’s summed up what you need to do: Get a meta box library. Add custom fields with dates Attach a filter callback action to the_content filter Get the current date, check your custom fields, append date in content. So here’s the filter callback, that lets you append your “next date”: function wpse66615_date_to_content( $content ) { … Read more
Milo, go in to the edit screen for each of the posts and make sure that you haven’t manually entered/edited the ‘Published On’ date/time.