Couple of things to note; one’s a WordPress issue, the other an SQL issue:
For WordPress, instead of editing the plugin files directly, you should use the 'getarchives_where'
filter it provides, and change the query there.
For SQL, in order to query for multiple post types, you need a conditional statement in the query, so looking for both ‘privacy’ and ‘security’ post types requires an can be done with an OR
IN
.
WHERE post_type IN ('privacy', 'security')
AND post_status="publish"
AND post_date <= now()
Combine this with the plugin’s filter and you get:
apply_filters( 'getarchives_where', function( $where ) {
return 'WHERE post_type IN ("privacy", "security") AND post_status = "publish" AND post_date <= now()';
}, 10, 1 );
Related Posts:
- wp_list_filter() and supports
- What are custom_css and customize_changeset used for?
- Is it possible to request several post types from a feed?
- What is the meaning of the various post messages?
- What does get_current_screen() do?
- Filter post_type thumbnail in Search result
- Post types – Normal Post – Image
- WordPress register_post_type Invalid post type
- How to edit default post settings
- Check If post id exist in custom post type , outside of loop
- Conditional based on post meta
- Displaying only the current category in template page
- Get all post types that supports tags
- How to get all CPT names into WP_Query ‘post_type’ parameter?
- How to set a default CPT template and create post attribute´s display rules?
- Post types showing tables…Can I do that?
- Show post type taxonomy
- wp_dropdown_pages() returns empty string for post type anything other then page
- Target Post Type from array Query
- Use register_post_type() to modify an existing post type
- How do i know the current post type when on post.php in admin?
- Only get post types based on support
- Overwrite rewrite-slug of built in post-type ‘post’
- How do I implement custom fields without using any plugins?
- Get All IDs Of A Post Type Using WP_Query
- List All Post Types in Admin view using /wp-admin/edit.php?post_type=
- Dynamically Set WordPress Post Title To The Category Name
- Registered Post Type Isn’t Showing in Admin Menu
- pop-up lighbox with AJAX
- Custom Post Type causes Page Not Found
- How do I make search results include ONLY pages, no posts?
- wp_query for displaying attachments with a tag
- save_post not working with attachments
- Multiple post type queries (with specific arguments for each)
- Undefined property: WP_Post_Type::$ID
- Understand post type
- Should I be using custom post types for this or terms and taxonomies?
- get_post_type() in in_array doesn’t work for some reason
- How to restrict wordpress search to pages and disable products listing search?
- View the number of entries recorded per day
- I don’t arrive to do order_by title when i have a conditionnal year in a request
- Does only custom post type have post type archive pages?
- Search query -> Show all pages except certain template
- wp_customize – detect post type to show/hide customizer options
- Registering different Post Formats for Blog Post and CPT
- child of post type (custom)
- Query reset problem or flawed code to enable custom post type query
- How to retrieve more posts from a custom post type that are in the same category as the current post
- force permalink slug for page vs post_type slug parent
- How to build a simple nav system of custom post type categories and its posts?
- Define add_editor_style to specific post types?
- get_the_post_thumbnail_url(‘full’) returns empty from custom post type
- How to get Post Type from the functions.php file
- single-{post_type}.php not working
- how to get random post id by using post type
- Adding in support thumbnail removes editor
- Can I change my post type to anything and my site still work?
- Custom filter for main search: how to exclude specific post_type from search results
- Grouping post-types in loop
- Local Post Date in WordPress Admin Panel Tables
- post_type internal ID?
- How do you determine if a result in a search query is a post or a page?
- How to hide specific post type from archive?
- get_post_types not working properly in admin
- Replace Post-Title with variable
- Post Type => Any conundrum
- Pros and Cons of Post Types vs. Multiple Blogs
- Why would post_type be ignored in this query?
- Filter Media by attached page or blog post in Library
- Can I automatically assign a page template to a custom post type (i.e page-slug.php file)
- Error in Fetching Custom Post Type parent Category URL (slug)
- Only show meta on one post type on search results page
- How to get all post status
- Difference between a default post type and a custom post type?
- Quick Draft widget (dashboard.php) using custom post_type
- Shortcode is not showing content when placed in editor (post_type = page)
- Distinguish between page and post in function
- custom post type single page not found after aotumatic publish By the author’s robot
- Filter by Post Type
- How to change labels in the projects page
- How to create custom post type selection to nav menu
- How can I get the Post ID and Post Type within a Must Use Plugin?
- How to mix 2 kinds of post types
- Shortcode in excerpt
- post_type not working when tag__in is present?
- Custom post type post_type_link gives “page not found” on any other custom post type
- How to set “manage categories” capabilities on a post type taxonomy but not on the general categories?
- Pulling in Related Posts based on Post Type array
- Disable default posts (Posts,Pages,Comments and Media) in wp-admin
- Custom Filter using meta_value in wordpress admin list not working
- Custom post types & Thumbnails
- Problem with permalink structure for WordPress custom post_type archive template
- Why does ‘exclude_from_search’ exclude a custom post type from WP_Query?
- Taxonomy Category category.php not working
- add post type pram to wp shortcode
- How do i retrive a post from a custom post type
- Quering array of post types & pagination. Articles are repeating sometimes on different pages
- Custom query for certain post type OR another post type with a certain category
- multible shortcodes (for differnt values) with one function
- Custom post type REST api 404: Updating failed. No route was found matching the URL and request method