With the Views plugin you can create different Views elements to display all your custom types and content on the front-end, without coding. You can also create powerful parametric searches and add pagination to your content lists.
When you ask for help or report issues, make sure to tell us the options of your View.
Viewing 15 topics - 1,531 through 1,545 (of 1,560 total)
Problem:
The user uses Toolset Access to manage permissions on custom post types. He also has a view that displays several custom post types. This view displays some posts that are restricted to the current user.
Solution:
Views queries do not take into consideration Toolset Access permissions or the default WordPress permissions. For example, a default view will display only the published posts. But, if you choose to display the draft posts or the private posts, it will display them without taking into consideration WordPress default permissions.
CPTs post pages, instead, are bound to WordPress default permissions and Toolset Access permissions.
To be able to use the same view and display different CPTs for different kinds of users, the only way, is to use custom code. You will have to use the hook to modify the view's query post types based on the user type.
add_filter( 'wpv_filter_query', 'prefix_change_post_types' );
function prefix_change_post_types( $query_args, $view_settings, $view_id ) {
if ( $view_id == 123 ) { // change this ID with the ID of your view
$types = (array) $query_args['post_type'];
if ( !is_admin() ) {
// display only posts and pages for non admin users
$query_args['post_type'] = array( 'post', 'page' );
}
}
return $query_args;
}
Problem:
The user is using blocks to create views, he would like to delete the unused views.
Solution:
Currently, there is no way, to find out the block views that are no more used on a page, content template or post. The next version will include a way to view the unused block views.
In the meantime, you can search for these views on the database level, but you won't be able to edit them, you will only be able to delete them.
Problem:
View filter not working for related fields
Solution:
Sorting view results with fields of parent post is not supported yet.
This feature is known to us and we do have internal ticket and I raised your voice to our internal ticket but I do not have any ETA when this feature will be added. Please note that there is no ETA on it.