The filter will be displayed by default if any posts of the current type already have a post format associated with them, regardless of whether the theme supports post formats or not.
We can see from your screenshot that posts already have post formats, so the filter is displayed.
Here’s the code that will allow you to disable the Post Formats filter:
/**
* Filters whether to remove the 'Formats' drop-down from the post list table.
*
* @param bool $disable Whether to disable the drop-down. Default false.
*/
add_filter( 'disable_formats_dropdown', '__return_true', 10, 1 );
One good way of finding filters like this is to inspect the HTML of the rendered page, then search the WP source for HTML class name (or other markup) related to the feature your’re trying to change.
For example, I searched for filter-by-format
found the disable_formats_dropdown
filter in formats_dropdown()
in wp-admin/includes/class-wp-posts-list-table.php
.
Related Posts:
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- How can I list only sites that use a particular theme or plugin?
- Get list of sites that uses specific plugin or theme
- WordPress site migration addvice
- Is there a reliable way to keep track of how long a WordPress theme has been active?
- Unable to install theme recommended plugins on Multisite
- Create a single website with 3 theme options in wordpress
- why need theme,if page builder is there in wordpress [closed]
- Cannot add edit themes and add plugins after multisite update
- Share plugins, themes, and multi post in a multidomain network
- In Multisite Setups, how to update mass sections of sub-sites
- Multisite converted to Single Site can’t add new plugins or new themes
- how to add navigation icons in specific template?
- How to Call Function From Separate WordPress Install on Same Server?
- Site is setup statically – how to make it content managable?
- Elementor pro page editing gives error There has been a critical error on this website. Please check your site admin email inbox for instructions
- Can’t load the the canges of field groups [duplicate]
- How to override any plugin file in the child theme
- how to display a template.php in a shortcode
- Replace old theme that understand old css (vcex_icon_box css_animation)
- WordPress website will not show menu on a Mobile Device
- Javascript console errors and WSOD on edit post pages
- Multisite – Cloning CPT pages + content (including ACF Flexible Content) from site to site
- Javascript embedded disappears for editors
- Mobile Menu and Mobile Sidebar missing
- WP Forms not displaying,becomming an fatal error
- Ensure WordPress Theme Uninstalls Completely
- Remove a div class with condition
- Can I edit multiple sites with an online WordPress account?
- How Can I Increase Breadcrumb Position Count (Starting From 2)?
- Main content of site not showing, but does show when logged in to wp-admin
- dokan edit functionality
- disable plugin activation on no multisite
- custom fields not displaying on wordpress site
- elementor development – custom widget like an inner section widget
- How Can I Create A Form In WordPress For Subscribers To Alert Them about new Listing posted?
- how to split and upload a theme on wordpress?
- Fatal error: require_once(): Failed opening required
- How to implement data residency in my WordPress site
- Ajax Call not Working in Plugin
- Changing the pointing of assets from old server to new server
- Different theme menu
- Hide Plugin Custom Post Type Menu Link
- How to Fix WordPress multisite woocommerce 403 file error
- Bash script to check available updates
- WordPress fresh installation did not update default plugin and themes to latest version
- How to capture hidden values with Gravity Forms
- Image path in childs theme
- Hooking into the HTML header container
- How to store a custom theme and update it on other installations
- How to get a post views count using ‘WordPress popular posts’ plugin
- the content of the uploads folder gets deleted periodically, how to figure out what causes it?
- What plugin would make this happen? If is the theme
- WordPress site hamburger menu toggle not working
- Can’t add new plugin or themes on a wordpress multisite network from the primary site as administrator. Error: ERR_TOO_MANY_REDIRECTS
- WordPress wp get_temp_dir return non exiting folder, thus failing plugin & themes update
- Set up new WordPress domain using unclear files
- Creating one user access account for all the multiple sites
- Removing Plugin Action via Theme for Non-admins
- Genesis Child Theme – Customize body
- Link custom post type to page
- How to disable a widget area of a specific page?
- Securing langugae folder
- when i activate my WordPress plugin cannot see customizer options or preview
- Writing SEO for Homepage when homepage is set to display latest posts
- How to prevent redoing get_posts queries and make results available to other scripts?
- Fatal error: Class ‘RDTheme’ not found
- How to use get_blogs_of_user?
- Showing different js file for different theme in wordpress customizer api
- Unable to activate themes on localhost
- How to roll back WordPress version or prevent migration from forcing update?
- Getting unknown text in footer of email
- Is it possible to disable a theme programmatically?
- How to fix blog article view and share #’s?
- Google trying to index child theme files
- Swap themes locally
- Seeking specific WordPress Layout
- WordPress panel is not loading after plugin activated with error: HTTP ERROR 500
- Description: Too much time has passed without sending any data for document
- When the user entered an unauthorized url redirect to login page
- Copying content from my other websites
- Install/Enable/Activate plugin on multisite without access to master site
- Why my multisite is this slow? (stats inside)
- Category as Subdomain for One WP Install
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- What’s a good way to default behavior if a plugin is inactive?
- How to set plugin across network in multisite and modify it in one place?
- Update javascript URL in header – Domain Mapping Plugin [closed]
- Renamed plugin folder and when I changed back nothing was activated
- I want add repository theme folder
- Cron job emails blank
- Add section (add_settings_section) to a custom page (add_submenu_page) not working
- How to make a website with two types of logins , Sellers and buyers?
- How To Add Code To WP Without Plugin or Functions
- In the WordPress API is there a way to set the width of the post/page container
- why my wordpress dont have toolbar like, plugin, themes and other?
- Shows warning when enable “wp_gallery_custom_links” plugin with Themify Builder
- Any way to force a specific plugin to use single site tables in multisite installation?
- how to add custom css at top above all css file for specific url
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?