I'm currently doing a website with ACF plugin. I get some data from an API (I have a json result).
In this result, I get this 2019-05-02T09:00:00Z. I need to add this into my ACF field. This is almost working thanks to the strtotime() function.
But instead of having this result : 02/05/2019 09:00, I have this one : 02/05/2019 09:05
What adjustment should I make to fix that (it's a Wordpress site, so in PHP only please) ?
Edit : my ACF function :
update_field('field_5bcce1711c3d5', $arrayParam["end"], $eventIdDB);
I've seen on forum that ACF is working with unix timestamp
Related
I have install WordPress 6.0 in my local system. and just open default post (Hello world),
in post showing double dates of post.
I have research for 2 hours and get a solution.
in my case I have add below code in my function.php file. ang get only one Published date
function jl_remove_post_dates() {
add_filter('the_modified_date', '__return_false');
add_filter('get_the_modified_date', '__return_false')
}
Source : https://wordpress.com/forums/topic/date-appears-two-times-after-editing-an-article/
User select date, time and then search
After click "Search Availability", it is needs to show all the available product within the provided date and time slot.
Using "WooCommerce Bookings" extension, how to do it?
I have customized both WooCommerce & Booking Extension:
To save bookable product :
woocommerce-bookings/includes/class-wc-bookings-admin.php
Method executes saving :
save_product_data( $post_id ) at line 434
File for searching listing page:
woocommerce/templates/archive-product.php
Skip loading boooking:
/wp-content/plugins/woocommerce-bookings/includes/booking-form/class-wc-booking-form.php
skip loading date time:
/wp-content/plugins/woocommerce-bookings/assets/js/booking-form.js
/templates/single-product/add-to-cart/booking.php
I tried to solve it as database driven solution first but data seems like unstructured. Also without identifying the Property and Method at the Code, you won't be able to make any customization. Doing customization the plugin and extension is easy but he hard part is understand the code structure and flow. Once you get it, you may do any level of customization.
There are lots of files (.PHP,JS) you needs to check but I have made it narrow for you. You only check the mentioned file above and can do your modification most of the case.
I get this error on my default WordPress feed: pubDate must be an RFC-822 date-time: Mon, 30 Nov -0001 00:00:00 +0000
Anything inherently evil in pubDate? And if so how to solve the problem?
If you look at the two occurrences of the error from Feed Validator, it's only happening because of the oldest two posts in the feed. Every post after that has the correct pubdate specification. WordPress itself follows the specification, but those two posts are missing the year.
This answer might be of use, as it's what's occurring in your posts
There are 4 dates stored for each WP post: Post_date, post_date_gmt,
post_modified and post_modified_gmt. I recommend you to insert the
same date for both post_date and post_modified and see if it works.
That worked, thanks! It was just the post_date_gmt field that needed
to be set.
If it's just those two, you can manually edit them in the wp_posts table in your database if you feel comfortable doing so, or there are various plugins available that can help with doing such a thing.
PSA: Always have a backup of your database before fiddling with it.
Upgrage your plugins with newer version here https://wordpress.org/plugins/wordpress-seo/
because there is a bug
https://github.com/Yoast/wordpress-seo/issues/525
but if it has not been solve your problems, then better you remove this two post
your.url/cliff-diving-boracay-philippines
your.url/bora-bora-activities-snorkeling-hibiscus
or make new version of those.
Try this .. might work
Go into your wp-includes directory and edit the feed-rss2.php file.
Replace this (line no : 89):
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
With this:
<pubDate><?php echo mysql2date('r', get_the_time('Y-m-d H:i:s')); ?></pubDate>
And also try to update the Post for which the date is wrong :
post ID = 17624 and 17637 or see the published date of these posts in edit screen
I am using WP-3.3.2 and had created a website eyepractice my script gets month and year from url and then shows calendar for that month and year but when I integrate with Wp it only work for year 2012 and if I use http://www.eyepractice.ca/optometris/guelph/?month=1&year=2013 it shows Page Not Found however I have already created a Page named guelph from Wp admin. I searched whole project for 2012 but it is not hard coded.
This is a REALLY old question, but I came across it while looking for solution to the exact same problem, so I will leave an answer here.
I used a calendar creation script based on this link:
http://davidwalsh.name/php-event-calendar
In Wordpress apparently using 'year' and 'month' as $_GET variables conflicts with Wordpress internal query variable handling, so the calendar only worked for current year for me and threw a 'page not found' error on the next year.
The solution was simple. As #janw suggested, change the parameter names. In the script wherever $_GET variable is called 'month' or 'year', change it to something else like 'cal_month' or 'cal_year'. Works like a charm.
I want to use WordPress for my blog. I will install it in my local machine. I know that it has RSS feeds with links. But I have 2 confused problems.
When my number of feeds is very big, assume 10.000.000. I want to limit the number of results when load RSS feed with a request's format as:
http://[myblog_domain]/[rss_name]?limit=25
to limit to top 25 results. May be 25,30, 40, ... or any integer for the limit parameter. Are there any way to do that?
Another problem, I want to load a range of RSS items with a request's format as:
http://[myblog_domain]/[rss_name]?from=31&count=10
to load 10 RSS items begining from the 30th one. May be any integer for the 2 parameters: from, count. Are there any way to do that?
Thank you!
UPDATE 1: about limit parameter
I see there's one while loop in the feed_rss2.php file with the format as:
while ( have_posts() ) : the_post();
// Your loop code
endwhile;
It iterate the post. It already has the limit referring to admin's setting section in the web: Setting / Reading / Syndication feeds show the most recent
I guess that I need to modify this iteration to fit my expectation when the url is passed the parameter (limit = 25, assume) .
How can I do it? Thank you!
UPDATE 2: Or Are there any plugins of this purposes?
Yes you can do that in wordpress, read below article first
http://codex.wordpress.org/Customizing_Feeds\
So you can modify the rss output template and dealing with the arguments