Replies: 0
I’m using Elementor’s post query functionality to filter a post list to show posts with a certain tag across multiple post types (in this case the default “post” type, and a custom post type). Users with accounts can see both types correctly when logged in and viewing the page. Regular non-users viewing the page cannot see the custom post type in the filtered post widget list.
Documentation on the queries: https://developers.elementor.com/custom-query-filter/
Here’s what I’m using for the filter:
//Post Query for combination of Encounter Resources and Generic Post items
// Showing multiple post types in Posts Widget
add_action( 'elementor/query/encounter_query', function( $query ) {
// Here we set the query to fetch posts with
// post type of 'custom-post-type1' and 'custom-post-type2'
$query->set( 'post_type', [ 'encounter_resource', 'post', 'encounter_resources' ] );
} );
Notably, if I disable the PublishPress Permissions plugin entirely, non-users can see the filtered list correctly with both post types displaying. Which points me to this plugin being the source issue.
However with the plugin enabled, removing the CPT from the filtered post types list in PublishPress Permissions’ settings does NOT resolve the issue, non-users still can’t see the CPT in a queried list. I’ve also tried the advanced setting to disable all filtering for anonymous users but that also didn’t resolve the issue. The only way I can get the CPT to show along side regular posts is completely deactivating this plugin.
If I set the post widget in elementor specifically to only this custom post type, users CAN see posts of that type (it just won’t include that post type plus default post types together) – so it’s not some blanket visibility issue, just seems to be tied to the custom query to show multiple types?
I’ve tried every setting under the sun for both this plugin just shy of deleting whole user groups that control this CPT, settings for the custom post type, and elementor.