The tag has no usage guidance.

learn more… | top users | synonyms

-1
votes
0answers
23 views

Contact Form 7 - Date Picker CSS/Toggle Help! [closed]

I am trying to create a form for hotel bookings and I used Date Picker from Contact Form 7 for Check In and Check Out. I could set up the skeleton and overall look of the form, but I couldn't change ...
1
vote
1answer
29 views

Converting Unix timestamp to wordpress date

I have trouble converting Unix timestamp (i.e. 1473897600) to Wordpress friendly date which displays at the date input field. I have a frontpage, post edit panel which is showing Unix timestamp. I ...
0
votes
1answer
33 views

Date and time format for UK in a custom post type [closed]

I display the date format of my custom post type like: jS M Y which display: 24th May 2016 It's great, however, I would like to add the time, keeping this format. Is there any format type for this ?...
1
vote
1answer
40 views

How i can limit period of post publication?

I need to limit period od post publication - admin type date, for example, 30.05.2016 in custom fields and then i need to hide custom posts with this date less, then today date How i can do this?
0
votes
2answers
28 views

convert time to WordPress user's local time

i saved SERVER time manually for specific options... i want them to convert to user-specific time for site (the time that is set in GENERAL OPTIONS). for example, i want 141234567890 to be converted ...
2
votes
1answer
30 views

Styling the date format with date_i18n

I'm in wordpress, I am trying to format the date output. This code use to call the end of the sales promotion: <?php $thepostid = get_the_ID(); $sale_price_dates_to = ( $date = ...
0
votes
0answers
52 views

Query between dates using ACF date AND Time Picker fields

I'm looking to be able to query (custom) event posts by date AND time. displaying a range of events on any given days. I should also be able to query events that span across multiple days, whilst ...
0
votes
1answer
28 views

Show modified time if post is actually modified

I want to display post updated time only if post is modified, I am using function the_modified_time() . So I just read about that there is if statement that can be used to check if post is even ...
0
votes
0answers
25 views

Update user meta when user login

I have created a custom field last login time, i want to fill it with last time user login date and time. function fb_add_custom_user_profile_fields( $user ) { ?> <h3><?php _e('User ...
0
votes
1answer
43 views

datetime jquery UI not showing after theme update

I had jquery datetime picker working when theme team ask me to upgrade it. That totally broken my site, but now I've fixed almost everything. Last thing I cant figure out is why Jquery UI datetime ...
0
votes
1answer
48 views

How to show Published date and/or Modified date

My code is based on the underscores reference theme. I have a posted_on function as follows: function example_posted_on() { $time_string = '<time class="entry-date published updated" ...
0
votes
2answers
42 views

WP Query and date format

I've been using a CPT named "session" that has some date fields. Those date fields are stored via the CMB2 plugin with something like this : $cmb->add_field( array( 'name' => __('Begin :', '...
0
votes
0answers
21 views

Date/Time Function Worked in February and Doesn't Fully Work Now

In February I wrote code using the Date/Time functions mixed with Meta Queries to show our event post type on this page. What is supposed to happen is that if the event hasn't happened yet, it shows ...
2
votes
3answers
218 views

datetime_timestamp shows numbers only? need in date and time

I am using CMB2 and following code to select date & time: $cmb->add_field( array( 'name' => __( 'Test Date/Time Picker Combo (UNIX timestamp)', 'cmb2' ), 'desc' => __( '...
0
votes
1answer
45 views

How to order custom user list columns by datetime?

I am trying to add the ordering options to some custom user list columns I added in the Wordpress admin. This is my code : function mmm_user_sortable_columns_query( $userquery ){ if( 'test_date' ...
0
votes
1answer
66 views

How can i display time minus 6 hours

how can i display date and time minus six hours in a post. For example now it's 23/02/2016 14:54, I need to display 23/02/2016 8:54. I'm using this in function.php of my theme: function displaydate(){...
0
votes
1answer
49 views

Display Year and Month from custom field + Age Calculator

I have a custom field "DOB" on my custom post type which is in [Ymd] format. I want to compare that date of birth to current time and want to show "You are # years # months." I am able to calculate ...
0
votes
1answer
56 views

Calculate how much time passed comparing WordPress comment and current time

I'm building a WordPress plugin. I need to show time like Twitter - how much time ago the comment was made etc. Is there a way doing this? Suppose someone comments 1 hour ago should be visible 1 hour ...
0
votes
0answers
48 views

Prevent scheduled post being published if date/time is past current date/time

I'm looking for a function at prevents a scheduled post being published/updated (with a popup warning or text next to the publish button) if the post's date/time is equal to or less than the current ...
0
votes
0answers
14 views

Prevent a post date being set if the date has already past **or** only allow future dates to be set

How would I prevent a user from setting a post date that is past the current date and time. In other words they can only set the date for the future.
1
vote
1answer
54 views

Use touch_time() on front-end form via plugin

I'm working on a plug-in that let people create posts from front-end form. I want to add date&time fields in the form using touch_time() but don't know how to use it on front-end. I have <div ...
0
votes
0answers
40 views

Use the_date with link

How I use the_date with link, a link to archive same date. <?php the_date('l j F Y', '', ''); ?> When there are multiple posts on a page published under the SAME DAY, the_date() only ...
0
votes
3answers
73 views

Show the_date with link

i try show the_date with link to same date! <?php the_date('l j F Y', '<tr> <th colspan="3"><a href="<?php the_date('Y/m/d'); ?>" rel="bookmark">', '</th> </tr&...
0
votes
2answers
151 views

How to get its meta_value of a specific meta_key within wp_usermeta

Using the S2member plugin, a meta_key for the last-payment-time is automatically stored in WordPress DB under table wp_usermeta (custom field is called wp_meds2member_last_payment_time). From ...
0
votes
0answers
156 views

modify admin panel all post to show date time

Hey I want to Know how can I modify admin panel all post to show date and time instead of only date. Published post will have published date and time and scheduled post will have scheduled date and ...
1
vote
0answers
118 views

Automatically add date to the auto generation of post slug

I need to customize the slug when you add new post and after you write title it creates automatically slug. I want to add before the auto title of the post the current date on this format d-m-y so the ...
0
votes
2answers
290 views

How to convert DateTime() to display time based on WordPress timezone setting?

I need to use PHP's DateTime(). It's currently displaying GMT time instead of the time that's set for the timezone setting (EST) in the WordPress Admin. How can this be converted to show the the time ...
0
votes
0answers
33 views

Display the_date() but force the_time() behavior if format is different

In my blog, there are two post formats, standard and link. For standard posts, the date of publishing is always shown at the end of the post, no matter what, and never above its title. For link ...
1
vote
2answers
73 views

Get date numerical and separate?

I need to work with date function but I want to get day and month numerical and separate and pass it to a function. For example, I want work for this function. function(day,month) How can I ...
0
votes
0answers
56 views

Keep pending post date as publish date

Is there some function which will set publish date of post same as pending date? I wish to keep pending time as published time, to prevent WP from using time when post is published as published date. ...
0
votes
1answer
83 views

Pull 'Popular Posts' within specific timeframe

I'm looking to display a weekly list of 'Popular Posts' on a site. Currently the list shows a 'Popular Posts' column but these are posts from no particular timeframe. It's displaying the most popular ...
0
votes
1answer
72 views

Test date object against previous date in loop

I'm working on a page which displays a list of radioshows sorted by date and time. The radioshow is a custom posttype with a name, pic, description and date/time info. There is a variable number of ...
0
votes
1answer
76 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
2answers
46 views

Fixing UTC time - wordpress effects

my centos server has a wrong utc time (example: now it's 7.54 utc and my server shows 8.15 utc). I'll fix this, but which will be the effects on WordPress? There'll be problems with cookies/cache or ...
-1
votes
1answer
84 views

Show monthly or daily archives

My code is this: #http://localhost/wordpress/2015/04/01 if (is_day()) { } //Prints January, April, 2015 #http://localhost/wordpress/2015/04/ if (is_month()) { echo single_month_title(' '); //...
0
votes
0answers
92 views

Sort by a date field in a repeatable group

I'm using cmb2 WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress. I have a repeatable group for events with the meta_key 'date'. The repeatable group 'date' serialized array includes '...
0
votes
2answers
118 views

Time Based change of image

Could someone please point me in the right direction, im currently using : <?php if (get_the_time('H') >= 8 && get_the_time('H') < 20) : ?> <img src="<?php echo ...
0
votes
1answer
49 views

Incorrect ordering of custom post type based on time

I have a custom post type as event which accept Custom fields' values as gp_event_date as ( 2015/02/26) gp_event_time as (SIMILAR) to 08:00PM - 10:00PM format. And on the list page, it orders the ...
0
votes
1answer
88 views

Using WP_Query to re-query and sort results using a date?

I'm writing a function to find the users next upcoming event (stored as CPT), chronologically. If I use a normal query and do something like 'post_type' => 'ticket', // another CPT set up to act ...
0
votes
1answer
131 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 ...
0
votes
1answer
24 views

wordpress blog posts's time

I want to show the blog posts'time like below: "A heading title , posted by XYZ, 1 hour ago" I want the time that says: 5 minutes ago, 1 hour ago, 2 days ago 1 month ago like that. how can i get ...
1
vote
0answers
64 views

Placed on + only date (not time)

When I create a comment or, ... you can set Placed on. For example: 20 june, 2014 on 14:23 . But I don't want the time (14:23). Only 20 june, 2014. Is this possible, and if so, how can I do this? ...
3
votes
2answers
391 views

Using WP_Query To Get Posts Randomly From today

In the logic of the data_query(); I found this WP_Query sample: <!-- Second Senses Featured --> <ul id="featuredSecond" class="featured-second"> <?php $today = getdate(...
3
votes
2answers
514 views

Ordering posts having multiple post-meta date fields

Hello WordPress developers. Over the years, I've found answers to many questions I've had with WordPress. I want to thank you for your help. Today, I have a question myself, and seek for expert advice....
4
votes
2answers
278 views

How to schedule multiple posts while adding new

In a WordPress powered news portal, they need to upload many news at a time on a certain period of a day, in most of the cases, after 10pm (today). But they are actually inserting news for the next ...
0
votes
0answers
320 views

How do you add Author and date Published on Category Pages?

I made a category on my Wordpress site. when i write any post and tag it in the category, the post displaying on the category pages in a neat way, everything is fine. But Google webmaster tools are ...
1
vote
1answer
203 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
1answer
848 views

Relative time - how to calculate difference beween post publish date and current time

I want to calculate the difference between post's publishing time and current time, and I want to read that value as a number (number of hours, minutes, seconds whatever, i just want it to be a number)...
0
votes
0answers
91 views

How to display time when page is created and edited

On posts I use this: Time created <?php the_time('Y-m-d'); ?> Edited (updated) <?php the_modified_time('Y-m-d'); ?> It works fine on posts, but on page template it displays just ...
0
votes
1answer
359 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 ...