Adding a screen option doesn't appear to be working, there's no screen option shown when I visit the 'All posts' page or 'Add Post' page. Is the below code correct and if not what should I change? add_action( 'wp_network_dashboard_setup', function() { add_screen_option( 'my_custom_posts_per_page', array( 'label' => 'Custom Posts per page', 'name' => 'my_custom_posts_per_page', 'default' => 2, ) ); } );
In WordPress code, how can I detect a screen option change? Ie, in the below image I want to hook when one of the column screen options changes. Is there a specific hook for this? My usecase: I need to add a screen option to the 'All Posts' page. If the user has unchecked my screen option then the All Posts table should not display posts that have a certain category. I have pretty much all my code for this …
I am trying to unset/hide some options in dashboard. I am trying it for products screen. Here is the screenshot Here is the code i tried to hide SKU /** Hide Dashboard widget by default via Screen Options */ add_filter( 'default_hidden_meta_boxes', 'wpfa_default_screen_option' ); function wpfa_default_screen_option( $hidden ) { /** Add WP First Aid meta box ID to default hidden Screen Options array */ $hidden[] = 'sku-hide'; return $hidden; } Though it didn't work at all. I need to hide these …
I have installed Wordpress 5.8.3 which is at the moment the latest version available. I'm trying to hide certain columns within the posts dashboard, but for some reason I doesn't have the option to do that, see: As you can see I have only the pagination options, but the columns are missing. I tried to disable all the plugins installed but same issue. I also tried to reinstall wordpress, but same. How can I fix that?
To new or technically-challenged users the Gutenberg editor's many buttons and boxes can be overwhelming, and it strikes me that it should be within the dev's control to eliminate as much of this as possible programmatically so as not to overwhelm the client/end user. With this in mind, is it possible to remove (preferable) or even hide the Options button, which also exposes a lot of functionality that many clients don't wish to expose to all end users. The Options …
Like any other WordPress user I have installed a few Themes and Plugins. I recently noticed that the boxes on my Home Dashboard change every now and then and only 3 of them they are always there: Site Kit Summary Quick Stats Yoast SEO Posts Overview I keep adding an putting back the boxes I want but days later everything switch back to these 3 boxes. How can I debug this issue? Is there any way I can have the …
I want to remove pagination by changing the default screen option value for posts per page, pages per page and media items per page, in the admin area, to 999. The default value is set to 20. I found the answer I need (I have pasted below from @KrzysiekDróżdż's answer in this question: Change default screen option value for posts per page) but am looking to also add a filter for the media library so it's consistent for all areas …
I want to hide many check boxes and its label in screen option only for custom user role (wdm_instructor and group_leader). How to apply below code so its for custom user role only: add_action( 'admin_head', 'remove_wordpress_cfields' ); function remove_wordpress_cfields() { echo '<style>label[for=wpassetcleanup_asset_list-hide] { display: none; }</style>'; } any help really appreciate
My client has problems with the Screen Options tab and in general with Javascript (or maybe WPBakery) related parts of the Admin screen. WPBakery-s blue buttons are not displaying to him at all. And it happens only, if he stays on a Product Editor page or on other screen that is Product-related. MY client's screenshot: My screenshot, at same product For me everything works flawlessly. We tired the following: with different user (admin) from other browser DevTools Console gives the …
I need to add a data-icon="" input to my Wordpress Custom Menu input box thing. This is so I can use an icon font and type the code in for a specific icon and in the CSS use pseudo elements to match it up and display the icon. I've found loads of tutorials which show how to extend the Walker_Nav_Menu class so I can add an attribute, but none of them extend this into adding a new input box on …
I am using the latest version of WordPress v5.3.2. I am trying to find out a way [through Code] to enable 'Custom Fields' by default, when on the Add/Edit Post/Page pages, at least for the one's already having some values added to the associated Custom Fields. I am using a different template file, for such pages/posts. Any help in this regard will highly be appreciated. Thanks
My plugins are updated, my WordPress core is upgraded, and I don't have anything too fancy on the website. Yet 'Screen Options' is missing. Where should I begin troubleshooting?
New to WordPress, I'm trying to debug the problem briefly described in the title of this question. None of these links works in our site when we edit a post. All work fine in any other components (Pages, Dashboard, etc.) Edge Console shows up this warning: HTML1521: Unexpected “/body>” or end of file. All open elements should be closed before the end of the document. post.php (765,1) And I get these two errors in the debugger: Also, by inspecting some …
I am currently hiding the screen options tab on a post edit screen with this function... add_filter('screen_options_show_screen', 'remove_screen_options'); function remove_screen_options(){ return current_user_can( 'manage_options' ); } This is working well, but if somebody has previously disabled a screen option then it is missing and they have no way of bringing it back. Is there a way to force all screen options to be checked for all users?
I am trying to change the author of a blog post but can't find the Screen Options menu when editing a blog post. Can you help? I've included a screen shot.
I want to add screen options to my plugin settings page, like the ones that are available in the Dashboard. I tried using the add_option method of the WP_Screen object and found that it supports only two options. per_page and layout_columns. Does anyone know what screen option to use to get options like the one in Dashboard page? Edit: Let me explain what I am trying to a little bit. I have different sections in my Bulk Delete Plugin and …
i'm working on my core theme plugin, i created a theme options in theme admin page, normally to avoid nonces errors, i must separate the sections with tabbed navigation, so i successfully did it , the idea was to set one section as default when the user enter the theme options page, when i tried to do , the only way to do it is to check on the current screen either with get_current_screen() function or the global variable $current_screen, …
I'm working on my Plugin & i wanted to declare one of the global wordpress variables which is $current_screen To Check whether The user is on the target page or some other page, my Approach was like this , but it didn't work out . class my_Class { public $current_screen; public function __construct() { global $current_screen; add_action( 'current_screen', array( $this, 'Current_Screen') ); } public function Current_Screen() { if ( $current_screen->parent_base == 'slug-page' ) { // Do Something ... } } …