The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
26 views

JQuery Datepicker Blackout Dates

add_action('frm_date_field_js', 'limit_my_date_field'); function limit_my_date_field($field_id){ if($field_id == 'field_jk8k8s'){ //change jk8k8s to the key of your date field //get all the ...
0
votes
0answers
19 views

Change permalink , keeping old structure with date

Currently on our website we have the /date/postname permalink structure with quite a number of posts. For SEO purposes we want to change it to /postname permalink structure but we want to keep the ...
0
votes
1answer
22 views

Date query for a custom meta field

I would like to use something similar to the following date_query but I would like to use some custom meta fields instead of the existing post columns. For example instead of post_date_gmt I would ...
0
votes
1answer
68 views

Query between dates using date picker filter breaks in Wordpress 4.2.1

Original post: Query between dates using Date Picker fields I originally made a post last year on this same subject, but seems the update to WP v4.2.1 has broken my filter. In summary, I am using ...
0
votes
1answer
41 views

$wpdb->get_results returns empty but value exists

this is my first question here. More then 5 years working with Wordpress, I always find the right way through the Google, but in this case I did not even know what to do, I really stacked :( So ... ...
0
votes
1answer
12 views

date() returns incorrect value if used from WordPress theme, but correct otherwise

As I have mentioned in title if I use date('H') function in WP theme, it simply returns UTC time, but the server is set to use timezone Europe/Riga and the same is set in WP General settings. At the ...
0
votes
0answers
16 views

create a RSS feed of upcoming events

I've created a custom calendar of events using a custom post type, and I want to send the upcoming events - whatever their published date - with a RSS based MailChimp newsletter. My RSS template is ...
0
votes
2answers
57 views

Skip posts, but keep posts per page

I'm running through a normal loop on one of my templates, and it displays a list of upcoming events with dates. I'd like the events that have passed to stay active, but not appear in my list of posts. ...
1
vote
1answer
30 views

Get the next event using date_query

I created a CPT called event and want to make a query to show the next future event, based on it's publish date. Here is the WP_Query args: $today = getdate(); $args = array( 'post_status' => ...
0
votes
1answer
39 views

How to filter posts in admin by before date or by post status 'future'?

I have read/searched a ton of questions but all I find seem to be related to custom post types and such. The situation is that sometimes we happen to have a lot of posts waiting for to be published ...
0
votes
1answer
62 views

group posts by month/date ignore years

Need group posts from custom post type by post date. Example: Jan (all posts posted in januar for all years 2010,2011 ... 2015) 1 (all posts posted in 1 januar for all years 2010,2011 ... 2015) POST1 ...
0
votes
1answer
39 views

How do I display a date correctly that is stored in the database as a backwards 8 digit number from Advanced Custom Fields? [closed]

I am modifying someone's Wordpress theme and they have a section for upcoming tour dates. The page for inputting was made with Advanced Custom fields plugin and uses a date picker widget that stores ...
1
vote
1answer
56 views

Complex WP_Query order request: DESC by day, but then ASC by time

I've got a site with a couple thousand time-stamped posts in a custom post type. These get displayed by a few taxonomies and a date query in various views (I've got that all working just fine ...
1
vote
2answers
44 views

Change date from 2015/02/23 to “1 min ago”

So here is my code to display the post created date: $date_create = '<div class="mydate-created">'; $date_create .= get_the_date('',$product->id); $date_create .='</div>'; ...
0
votes
1answer
34 views

Limit loop to future events

I have a custom post type, basic_events, with a custom date field, date_of_event. My view shows these posts in ascending order, based on this custom date field. $args = array( 'post_type' ...
0
votes
1answer
75 views

How to show list of posts with custom field value (a date) that are coming soon

I have a custom post type called client and it has a custom field of next_due_date, that is a date without time. I want to have a list of posts that have a next due date that is coming up soon. I ...
0
votes
1answer
28 views

Show post date on the page

What is the php code for showing post date on the page? For example, it is a woocommerce product and here is the php code that I have so far: does this work? if ($hide_price !== '0') : ...
0
votes
2answers
141 views

Remove Page Timestamp via functions.php so it doesn't show in Google Search Result Description [closed]

I want to remove the last updated / last modified date from pages (not posts) via functions.php (could this be done by making that hook __null?) The goal is to remove the google search result ...
0
votes
2answers
72 views

How to make an archive page displaying posts in a date range

I'm trying to make a couple of Page Templates for different Pages that should act as an archive to display posts (a Custom Post Type actually) in a certain date range. The website it concerns is ...
0
votes
0answers
48 views

How to get past and upcoming post by defining date in custom field?

I have create a custom post type "event" and created some posts in it. I have also created a custom field "EventDate" and giving value like "April 08, 2011", "February 08, 2016" etc for each event ...
0
votes
2answers
142 views

How to get post creation date?

I suppose getting the first revision of a particular post and get the date, right ? How to do that?
1
vote
1answer
47 views

Bulk edit post date in wordpress

I need to edit the date of several posts, change it to a specific date, all posts should have the same date. How can I achieve this? Is there any fuction to add to the functions.php to add this ...
0
votes
1answer
69 views

Changing default WP-Site creation date

I started creating WP-Site this January-2015 but as per my project I need to include posts which are from year 2007 I created posts with the required date now I used a calender which sorts posts when ...
1
vote
1answer
29 views

Add a link to display posts with a specific tag within a date range

I'm trying to create a WP-based website with lots of documents about various people from different dates. I would like to have a dedicated page for each individual where there'll be links to display ...
0
votes
1answer
198 views

wp_query if have posts show date but not in loop

I have a wp_query set up to show events and I want to show the date if we have posts and if we do not I do not want to show the date. Here is my code: <?php $today = getdate(); ...
1
vote
1answer
37 views

Can wordpress differentiate between added and updated posts?

I've been looking trying to find an answer as to wether it is possible to get wordpress to display if a post has just been added(published) or if it was simply updated? (This is to add on a homepage, ...
0
votes
0answers
62 views

auto post with custom date php wordpress

When i upload the image from wp_media, this below code runs: add_action('add_attachment', 'auto_post_after_image_upload'); // Wordpress Hook function auto_post_after_image_upload($attachId) { ...
1
vote
3answers
140 views

How to display all posts with today's same month and day only?

I'm trying to figure out how to do this. I have many posts. I want it so that when someone pulls up the site, the front page shows all the posts that were done on the same month and day -- but ...
0
votes
1answer
35 views

Loop through all posts in a certain year

I would like to loop through all posts within a certain year. Pretty simple setup: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> // doing content stuff here <?php ...
1
vote
1answer
20 views

About Time conditionals

I'm trying to compare times like: if this post was posted between the past 6months show human_time_diff() else show the_time('j. M .Y') my idea was: function time_ago() { global $post; ...
1
vote
1answer
77 views

Only showing the_date and the_excerpt for first entry in get_posts

this code below shows the titles and links for 5 posts in get_posts no problem but only displays the date and excerpt for first post... any help please? <?php $args = array( 'posts_per_page' ...
1
vote
0answers
108 views

How to manually change current date to post date in frontend?

Well I want to know how the viewer on my website can change the wordpress current date to the post date (preferable from the dropdown as Day and Month). So if today's wordpress date is 22 December, ...
0
votes
0answers
57 views

Update the published date of a post to custom field date

I'm not sure if this is possible with WordPress or not. I googled a bit and didn't found any answers. So I need to update the publish date of a custom post type with the custom field date I entered. ...
0
votes
1answer
34 views

Thirtieth century date for a post

I want to break the date mechanism in Wordpress. I need to have dates set in the 30 century, controlled through the regular post, but only for one category. To give an example I'd like a post dated ...
0
votes
1answer
161 views

WP Query Sort by meta value (date)

I have the following code where I want to sort by meta key "event_date" and only display posts after todays date and 3 weeks ahead. Somehow nothing happens, even when I'm stripping down the WP Query ...
0
votes
1answer
27 views

Organize content by month? SQL statement?

Using custom content types and custom fields with a pretty standard setup to post the content to the page. Where I'm having difficulty is trying to organize this content by date. I have a field ...
4
votes
1answer
78 views

How to put last edited entry on top of the blog-post list?

In the list of my blog posts, the "last published" entry is on top. I'd like to view the "last edited" entry on top of that list. I couldn't find a setting for that, so how can I realize it?
0
votes
1answer
67 views

Retrieving posts by their date and category

I'm trying to create a plugin for displaying post titles and dates (which will be displayed as links to those posts) of a specific date range and category. So far I have managed to get to display the ...
4
votes
3answers
515 views

Post doesn't show date if there's another post with the same date

I have custom post type "press." and made a page template the queries posts of that type. The posts are supposed to show their published date, but if there are more than one posts with the same date, ...
0
votes
2answers
80 views

Show single posts date, in a page of posts

In a page of posts, how do I show their date, instead of the page date? I have no php knowledge. Let's say I want to show the single posts date here, instead to the single posts title. <?php ...
0
votes
0answers
62 views

How to compare date in post meta value

I have some custom meta fields. Some are date fields but WordPress saves everything as a string, so how can I compare the dates? $meta_query_args = array( 'relation' => '', // Optional, ...
1
vote
1answer
95 views

Date query not inclusive despite parameter being true

I've set up a small test query to get some posts from October 1 to October 10. I published a post today ( October 10 ) and with the date query parameter of include set to true, I would have expected ...
0
votes
2answers
107 views

Individually styling date month year [closed]

I am using underscore_s barebone theme to build mine and came across this challenge that I would like to style date month and year separately with CSS and the code output puts them together. I dug ...
0
votes
1answer
28 views

Wordpress giving a 404 page when passing a year argument different than the current year

On this page you will see I'm listing events that fall in certain months: http://conciergemaps.ch/events/ This is on Wordpress, When you select a certain month and year it appends the URL with two ...
0
votes
0answers
35 views

Sorting events by meta date value after current date

I have custom post type "Events" and also have custom meta box date, in default mode its working and sorting events with published date, but i want changing events sort by custom date, i've added that ...
1
vote
2answers
167 views

Fetch posts from current week (Sunday to Saturday)

I'm trying to fetch posts from current week. <?php $args = array( 'date_query' => array( array( 'year' => date( 'Y' ), 'week' => ...
0
votes
2answers
79 views

How to display custom post type ordered by a custom field date

I have a custom post type for a timeline activities. each post of them has a custom field type of DATE. field name :activity-date I'm using TYPES plugin for Custom Post Type and Custom Fields I ...
0
votes
1answer
171 views

automatic send email at custom time

I want to send an automatic email every day at 10:00 I tried this code $timeN = date('H:i'); $timeS = date('10:00'); if ($timeS == $timeN) { $to = get_option('admin_email'); $nfrom = "my ...
0
votes
1answer
121 views

Permalinks using event date (year & month) instead of publication date

The site http://www.bikefun.org is live and working, but the permalinks are not quite right. It is an event calendar site. Events are stored as a custom post type "bf_events", with dates stored as ...
0
votes
0answers
83 views

Events filter using wpdb for queries

I'm a WordPress (PHP) developer, however I have not done a lot of complex MySQL queries. I am working on an events website and want to create filters: User should be able to filter events by the ...