opps .. sorry for duplicate post
No problem, I'm using 2222. My settings in FileZilla look like yours for the General tab. Here are my tabs. The only thing I can think is maybe the host has banned my IP for too many failed attempts?
Hi Christian,
Please could you try with username: gilpinintranet-toolset
That now seems to be working for me. Otherwise all settings on the 4 tabs look the same.
If that still doesn't work is it an option for you to send me modified .php files (renaming the extension to something like .pdf and I can rename .php) and I'll then upload for you?
Thanks
Still not working for me, unfortunately. I'm not sure what could be the problem. At any rate, I can provide some code for you to implement. Can you tell me:
- What post type(s) will this date range field be applied to? Please provide slugs for each post type.
- What is the slug of your custom date field?
- Should the date field be updated whenever the post is updated, or only on the original publish date?
Sure thing .. sorry it's not working.
- Post type is called: maintenance-issue
- Custom date field is called: issue-date
- Updated only on the original publish date please
Okay try this. Add the following code to your theme's functions.php file. If you're not using a child theme, remember that updating your theme will overwrite this function and it will stop working.
function copy_custom_date_field_on_publish ( $post_id ) {
// only copy over the publish date on original maintenance-issue posts
$status = get_post_status( $post_id );
$pubdate = get_post_meta( $post_id, 'wpcf-issue-date', true);
if ( $status != 'publish' || $pubdate )
return;
$pubdate = get_the_date( 'U', $post_id );
update_post_meta( $post_id, 'wpcf-issue-date', $pubdate, '' );
}
add_action( 'save_post', 'copy_custom_date_field_on_publish', 1000 );
Then try to publish a maintenance issue post from wp-admin. You should see the custom field update to include the current date (and time, if your custom field includes time inputs). Modifying a published post should not trigger an update of this field. You should be able to find the custom field in your sorting and filtering options for Views. Let me know how it goes!
Hi Christian
Thanks for the code. I've created a child theme and added the code to the functions. I've done a random check on a number of posts and can see the publish date field has copied across to the custom date field. This is great thank you.
Almost there... I've added the date picker code back onto the views filters on this page:
hidden link
(replace the (dot) with a . for the url to work)
It doesn't seem to work very well ... it's a bit slow to show the selected date and the filtered list is showing posts outside the date range I've selected. Maybe my filter code is incorrect which is:
<strong>Date picker:</strong>
from [wpml-string context="wpv-views"][wpv-control field="issue-date" url_param="issue-date_min" type="datepicker" ][/wpml-string] ... to [wpml-string context="wpv-views"][wpv-control field="issue-date" url_param="issue-date_max" type="datepicker"][/wpml-string]
Here is the view's edit page: hidden link
Thank you so much for your help so far.
Okay it looks like there was a filter control but no Query Filter, so the control didn't do anything. I've added the appropriate Query Filter for your date range. See the attached screenshot.
This seems to get the date range behaving correctly. Can you confirm this, then I can check on performance?
Hi,
Thank that looks like the filter is working great now. But I noticed with the AJAX switched on the Update Form has disappeared.
I've attached a before and after image to show you which bits are missing.
Okay, I've seen this bug before - CRED forms were not showing up on AJAX-updated Views. As I understand it, this has been resolved in the latest versions of Toolset plugins which were released yesterday. When you have time, I recommend updating CRED, Views, et al to resolve this issue. If you're still missing CRED forms on AJAX requests, please open a separate ticket so we can investigate this issue in more depth. Thanks!
Hi,
I've updated the plugins and can see the CRED form is still there - so that's fixed.
But after filtering down the post count is still 89. If you filter on 23rd May to 24th May there should be 12 on the post count.
It's also still very slow. Is this the best set of options? Would it be faster if it didn't reload the page?
Two things about the item count:
- The shortcode you want to use here is [wpv-item-count]
- When you place this shortcode in the filter area, it doesn't update like you might expect it to during an AJAX call. Instead, I recommend placing it in the Loop Output area. You can place it above the <wpv-loop> tag.
I agree, it's painfully slow right now. This isn't normal, but I've seen some strange things on wp-engine. They have their own proprietary caching system, and it seems to slow down some of the calls we make to admin-ajax.php when you're logged in. With Visual Composer enabled, that slowness is exaggerated even more. As a test, I'd like to see what this page performs like when a user isn't logged in...but that would require you open the site up to visitors. The day is ending for me here. I'm off Friday and Saturday but will be back online Sunday to follow up. If you need an earlier response, feel free to open a new ticket and close this one out.
All working great thank you. It seems much faster on the live site.
Thanks so much for your amazing support!!