Well, it works if i use a filter like this:
add_filter('getarchives_where','docs_filter');
function docs_filter($where_clause) {
return "WHERE post_type="cpt_docs" AND post_status="publish"";
}
Thk all.
Related Posts:
- Custom post type for ‘staff’ versus using wordpress user profiles?
- What are the differences between custom post type and custom page templates?
- How to get custom post type label and singular label from its slug?
- next_post_link() not working for single custom post type post
- How to set a default format for a custom post type?
- Now can I group custom post types together?
- WP insert post and custom taxonomy
- Does anyone have any frameworks to setup custom post types and related actions/filters?
- echo value from ‘select’ field type into page template using cmb2?
- Exclude add_filter from the admin
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Sanitizing post content for use in an email
- Genesis Child and Custom Post Type
- Query multiple taxonomy in Custom Post Type
- automatically create taxonomy with same name as post title
- Separate Custom Post Type Taxonomy by Comma
- saving custom post type data to different table in wordpress
- Display “Post 2 of 4” on single post page?
- Query post types with multiple keys
- register_post_type – rewrite / feeds, what’s it for?
- WordPress import not importing custom taxonomy
- How to generate a sitemap with custom posts (not Google XML)
- Why are navigation items saved in the database?
- Filter posts with meta_query NOT IN where value has multiple values
- How to make post sticky in the admin page?
- WP 4.7 broke get_post_type or requires an explicit integer value?
- Remove base slug in permalinks of hierarchical custom post type
- is_main_query() not working for WP REST API
- How can I move a custom taxonomy and its data from one post type to another?
- rewrite custom post type slug in wp admin
- Displaying the type of post (Custom) in a single.php
- If Statement – if current post is a child of a post with a taxonomy
- Get next and previous 3 posts in a term in single post page
- Rewrite slug for CPT
- Deleting Custom Posts & Meta Data on Uninstall
- Register widget only page is a singular of custom post type
- I’d like to cycle through existing posts in a post type, showing one per day ordered by title, and starting over when the last is reached
- Remove the parent slug in a CPT URL
- Addition of custom option panel crashes Media Library & Admin Area
- Including metaboxes from custom post types in global search — continued
- CPT’s with landing page instead of archive – Url Rewrite?
- How to produce a sub-page-system in WordPress
- How can I add a filter to a particular post format?
- How do you make a custom post type items automatically delete items 3 months after publication?
- Custom Post Type Metadata Not Saving
- get_post_meta is not working inside shortcode
- False Positive on has_post_thumbnail
- Custom Taxonomy not displaying all post
- Custom Meta Box Causing Error: “Are you sure you want to do this? Please try again.”
- How to Display Posts From Category Within a Custom Taxonomy?
- When updating non-public custom post type it says “Post updated. View Post”
- Published post auto change status to pending after 90 days
- Enable comments on custom page type – option not showing in “customize” for theme
- How to migrate Custom Field Template to a WordPress Multisite
- Automatically update slug with latest title within custom post type [duplicate]
- How to Query in WordPress which shows Alphabetic Posts?
- Using breadcrumb to return from single-page to list
- How can I lock specific posts (cpt’s) from editing by anyone other than ADMINS
- Why do I need to register my custom post type a second time when flushing rewrite rules?
- How do I Query 2 Custom Post Types?
- Function to erase every post from a taxonomy
- Custom Post Type or Shortcode, What to choose? [closed]
- Building a Data Intensive Website with WordPress
- Custom post type, taxonomy and admin bar
- Change permalink for custom post type?
- Use Author Ids or Names to echo different output inside loop
- Truncate custom post type content
- Select Venue from dropdown list and reuse stored address information in meta_box
- Use a different URL path / permalink for CPT
- Group episodes by seasons
- Custom post type set default template using block editor
- Why this didn’t work if i use get_the_ID(), but works if i pass the numeric id
- Create API’s for custom-post types & custom queries using REST or Graphql
- Show Custom Post Type based on Category on Archive Page
- click tags for custom post types
- Author page not loading the authored post archives
- Delete all custom posts then upload a new CSV of events
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- My CPT has archive false, now I need use parent Page for slug
- Slugs on hierarchical taxonomies
- Links Image in “Catalog” Page to Posts
- ACF saving posts
- All custom posts are not showing up
- WordPress query posts by custom post type not workng
- Menu disappears with custom post type link
- Structuring 3K pages in WordPress
- How can I detect a chosen Isotope layout option from within Javascript to generate appropriate layout?
- How can i embbed two different galleries in custom post type
- How to display the FAQ Archive page in my menu
- No Current Class showing in Menu for Custom Post Types
- Creating a custom post type – want to add an alert for user
- Custom filtering on month value only of an entire date field
- create functions based on array values
- Split custom post list into two columns
- How can i display on front page a movie that is atached in a post type
- Order custom post type is beign ignored
- How do i get the taxonomy term name on the CPT archive page?
- Add a background image into a post [closed]
- WPNavi pagination links not working on custom pages
- Rewrite Rule for custom post type link with or without taxonomy terms