The setting to “Show only filter options that would produce results” in a View with custom search can result in expensive queries on larger sites with several filters, and the last update of Views/Blocks included efforts to optimise these to make them maximally efficient.
It seems that in some cases this has led to the setting not working at all, in particlar on the initial page load rather than when changes to filters are applied, such that filter options include options that would lead to no results.
Solution:
This is fixed in next version of Toolset Views/Blocks plugins, currently you can try the patch file of below erratum:
Solution:
It seems you must have created a content template before for the post type "Free Items" and didnt provide the proper name for that CT then deleted it and then created a new CT and assign it. Due to that there must be some edge case and the new CT was not assigned properly.
Problem:
The issue here is that the user wanted to change their user role when a post form has been submitted.
Solution:
This can be done by using the following hook.
add_action('cred_save_data', 'change_user_role_on_save',10,2);
function change_user_role_on_save($post_id, $form_data)
{
// if a specific form
if ($form_data['id']==573)
{
$user = wp_get_current_user();
if ( in_array( 'subscriber', (array) $user->roles ) ) {
// Remove role
$user->remove_role( 'subscriber' );
// Add role
$user->set_role('editor');
}
}
}
What you need to do is replace 'subscriber' with the user's current role and then 'editor' with the role that you want the user to gain. Finally just change the 573 to the ID of the post form.
This code can be added to the Toolset custom code snippets at Toolset -> Settings -> Custom Code.
Once it has been added please ensure that you've activated it.
Problem:
u_post_count function of children posts - get related posts in relationship based on provided author ID
Solution:
To query the related posts based on the current loggedin user or author, you will require to use the WP_Query to fetch the related posts in relationship based on provided author.
Problem: I've migrated my site to a new domain, and now my image custom fields contain URLs that include the old site domain. I would like to change those custom field values to point to the new domain instead.
Solution: A good 3rd-party site migration tool can handle domain replacements for image custom field values automatically during the migration process. Another option is to export your site's post content using the standard WordPress export process. Once that export file has been generated (it will be an XML document), you can edit it with a text editor like Sublime Text. Use the find-and-replace tool to find all instances of the old site domain and replace them with the new domain. Refer to our documentation below for more information about direct database modification using SQL.