How to get all post status

Question
I need to modify this code to show all post status, not just published. Any idea? $post_types = get_post_types(array('public'=>true),'names');$post_type = !empty($_REQUEST['type']) && in_array($_REQUEST['type'], $post_types) ?$_REQUEST['type']:get_option('wpfc_default_type'); $args['post_type'] =$post_type; \$args['post_status'] = ...
0
3 months 0 Answers 40 views

How do I set default meta value by post type?

Question
I'm trying to set a meta variable depending on what custom post type is set but can't get my code to work. This is the function in the plugin that sets the metabox after the plugin has added it ...
0
3 months 0 Answers 39 views

Get all post types that supports tags

Question
I'm trying to get all the post types that has tags functionality. I searched a lot but couldn't find a conditional or something for that. I need a way to get post types or post objects for the posts which ...
0
4 months 0 Answers 39 views

How to restrict access of Elementor Elements Library on frontend?

Question
I am working with Elementor for a theme and so far everything is fine. I have made some templates that can be found under the Templates menu. They have a post_type of elementor_library and I would like to know if their ...
0
5 months 0 Answers 76 views

Why does ‘exclude_from_search’ exclude a custom post type from WP_Query?

Question
In WP 3.1, it appears that setting 'exclude_from_search' = TRUE for a custom post type excludes the post type not just from searches on the front-end, but also from any post query using 'post_type' = 'all'. I can imagine plenty of ...
0
5 months 0 Answers 70 views

How can I filter block registration based on post-type? (Block alignment settings)

Question
I want to disable the .alignwide and .alignfull block alignment options (remove them from the editor UI) on the 'post' post-type only. I have tried using this block registration filter to modify the 'supports' attribute: function disablePostAlignwide( settings, name ) { ...
0
7 months 0 Answers 77 views

Twillio How To Send SMS for Custom Post Type

Question
Twillio has a tutorial where one assembles a plugin that sends SMS notices when 'post' is published. The issue I face is many 'post' types are published a day and that would generate an annoying number of test messages. So, ...
0
7 months 0 Answers 90 views

How to enable Attachment post type in Gutenberg editor for blocks?

Question
I would like to make the native Attachment posts to be accessible by various Gutenberg Blocks. (To appear & be selectable in dropdown menus, etc.) Is that possible? The nearest answer i found is this. However that is not working for ...
0
7 months 0 Answers 79 views

Question