Forums › Forums › Search & Filter Pro › Post Meta and Tags Displays
- This topic has 6 replies, 2 voices, and was last updated 8 years, 7 months ago by Ross.
-
Anonymous(Private) March 8, 2016 at 10:43 pm #39023
Hey Ross,
I’ve got a problem can’t quite figure out.
My display uses a shortcode, and the Search Form is mostly Post-Meta downloads with one download_tags filter. There is one conditional on the meta-data. And this is working with FES.
The problem is when a vendor submits a product.
It will show up in the filter that doesn’t have the meta-data conditional. However if I go into the download in FES and update the tag, then it will show up.
thanks for your kind help.
Ross Moderator(Private) March 15, 2016 at 9:42 am #39429Hi Christopher
It sounds like the cache is not updated when something has been changed in FES – in this case you will need to trigger a rebuild of the current post using this action:
Thanks
Anonymous(Private) March 21, 2016 at 6:33 pm #40043Hey looking a little deeper on another search form I found that the Tags selections made by a Vendor are not being logged at all by the search form.
In the FES form I have a form for
Tags:
Id’s: 154,155,158, etcIn the SF form I’ve selected
Download Tags (download_tag): and the Id’s show the right tags. The data is just not synced up properly.You take a look here at the:
http://www.lessonpick.com/general-esl
Resource TypeAlso it looks like the count has old products in it, because it displays 3 for lesson plan – how do I clear the filter cache?
And in firefox after upgrading for some reason all the text displays in all caps for selection items. A little confused by that.Appreciate your kind help
Ross Moderator(Private) March 22, 2016 at 10:00 pm #40297Hey Christopher
When a user updates any post in the wp-admin, the WP filter
save_post
is run.S&F hooks into this, so that whenever a post is changed in any way (tags, categories, taxonomies or post meta are updated), save_post is run, and S&F rebuilds the cache for that particular post.
This also occurs when moving an item to the trash, or deleting permanently.
So S&F will stay in sync with a post automatically.
I’m actually not too familiar with FES, but I’m assuming because users of some type can change data associated with a post from the front end, that this may bypass the WP
save_post
hook.Therefor, whenever any change is made to any post, using FES, you must run the action:
do_action('search_filter_update_post_cache', 23);
, where23
is the ID of the post.This should occur when deleting/adding anything at all..
Have you made sure this is happening in your setup, because it sounds exactly like this is the issue that is occurring?
If you have, can you provide wp-admin details, and direct me to what functions are called when a post is update in FES, and where you have attached the above code?
Thanks
Ross Moderator(Private) April 20, 2016 at 6:31 pm #43423Hey Christopher
I was actually helping a user the other day and found the actions – pasted in case you needed them:
add_action('fes_submission_form_edit_published', 'sf_edd_fes_submission_form_published', 20, 1); add_action('fes_submission_form_new_published', 'sf_edd_fes_submission_form_published', 20, 1); add_action('fes_submission_form_edit_pending', 'sf_edd_fes_submission_form_published', 20, 1); // this might not be necessary add_action('fes_submission_form_new_pending', 'sf_edd_fes_submission_form_published', 20, 1); // this might not be necessary function sf_edd_fes_submission_form_published($post_id) { do_action('search_filter_update_post_cache', $post_id); }
Thanks
-
AuthorPosts