Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Remove Meta-boxes (Yoast SEO plugin) [duplicate]

See WordPress SEO by Yoast: Hide Meta boxes in posts for non-admins

add_action('add_meta_boxes', 'yoast_is_toast', 99);
function yoast_is_toast(){
    //capability of 'manage_plugins' equals admin, therefore if NOT administrator
    //hide the meta box from all other roles on the following 'post_type' 
    //such as post, page, custom_post_type, etc
    if (!current_user_can('activate_plugins')) {
        remove_meta_box('wpseo_meta', 'post_type', 'normal');
    }
}

Related Posts:

  1. Plugin API for easy admin list table generation, handling & exporting of MySQL tables?
  2. Completely remove WP_Admin_Bar for specific user roles
  3. API to trigger prompt on leaving page
  4. Show message on wordpress admin dashboard
  5. Hook the Keydown Event in the TinyMCE Post Editor
  6. Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?
  7. how to use thickbox in admin?
  8. Add a jQuery function to admin pages
  9. Is it save to require plugin.php early to be able to use get_plugin_data() earlier?
  10. WP Cron doesn’t save or in post body
  11. How to enable users to down-vote in this simple voting counter (that uses the post meta)?
  12. Filters ‘request’ and ‘parse_query’ not firing in sites.php nor link-manager.php
  13. URLs of plugin resources?
  14. Problems with removing admin bar
  15. Check if I am in the Admin Panel (wp-admin)?
  16. How can I free up the memory used by update_post_meta?
  17. How to redirect to action on custom page within admin section
  18. Plugin development: get_post_meta is not working [closed]
  19. Ordering posts by metadata
  20. WP AJAX is not working, always returns 0
  21. Add notification bubble notice in navigation using transients
  22. Can I individually style items in the backend widget list?
  23. Act on user meta updated, but only once
  24. How to run a external JavaScript file on wp-admin if admin, and other if normal user?
  25. Where should I put “run once” plugin pages?
  26. How to check if Woocommerce Order number equals to post ID?
  27. Issue plugin commands in admin settings page
  28. Any problem in using native jquery ajax style instead of using admin-ajax.php?
  29. maintaing consistent layout wordpress dashboard
  30. Replacing Scripts in Admin Load_Scripts
  31. Programmatically modify an admin page UI of a WordPress site from my WordPress plugin
  32. 403 Error when text is pasted in Custom Metabox Textarea
  33. Problems with: manage_${post_type}_posts_columns
  34. Global State During an Admin Post
  35. Render content after post title in wp-admin
  36. Saving value of a selection option in comment form as comment meta
  37. On cliking add new post redirect user to a custom page first
  38. Add a Save Button to Custom Meta Box [duplicate]
  39. Plugin with action ‘save_post’ needs to press publish twice on order to publish
  40. What should happen when a WordPress Plugin is activated across the network (Network Wide Activation)
  41. How to add WordPress Admin “Insert Link” UI (searches through existing posts for URL) and functionality into a custom plugin?
  42. Is it possible to restrict all admin pages except theme customisation and storefront using plugin?
  43. Password field is empty when using wp_signon();
  44. Run Shortcode of post’s custom field in functions.php / Plugin
  45. Using ReactJS in the WordPress admin for plugin development
  46. template_redirect or admin-ajax.php?
  47. Creating Admin Plugin – Content of a page is displayed at global scope as well
  48. How to load library scripts in admin from plugins in noConflict wrapper?
  49. Show error message after exception handled
  50. Issue with contextual help overwriting existing content
  51. Alternatives to DISALLOW_FILE_EDIT wp-config Constant? It Breaks Some Plugins
  52. How do I link to a php file in my plugin directory?
  53. WordPress Admin Login Custom Logo
  54. How to create custom settings page for custom plugin
  55. Creating multiple wp_editer() text fields in for loop — the text/visual switch only works for first editor
  56. Displaying “One Time” Notification in Plugins
  57. Wp-admin Custom User Management
  58. How to add custom options for plugin into the add post screen – like yoast seo
  59. Filter for admin (back end) ‘reply to’ comment
  60. WP nonce field checkbox prints checked=’checked’ outside input field
  61. Data not insert and update through ajax and jQuery in admin page?
  62. Redirect in WordPress plugin
  63. How to add custom view links to wp-admin/post.php?
  64. Is it possible to load the css just on my plugin admin page?
  65. AJAX button with success callback. (Titan Framework)
  66. jQuery UI tab does not work in the plugin page
  67. Using delete_post_meta for deleting multiple selected options
  68. Disable Auto-Expanding Menu in WordPress Admin Menus
  69. Best practice for plugin: always detect admin-ajax call?
  70. Get audio metadata on file upload
  71. Submit form to a different PHP file in the same plugin folder
  72. Plugin can’t be activated [closed]
  73. Is there a way to add a link with add_post_meta?
  74. Adjust query on single
  75. How to add text editor in plugin menu?
  76. Get cat parameter from admin-ajax
  77. check_admin_referer()
  78. How to make an admin plugin menu page go full screen?
  79. Condition to check previous next article post title
  80. Add New Button in Admin Panel
  81. Disabling Yoast, All-in-One, and Rank Math on Certain Pages within a Plugin
  82. 400 Bad Request and illegal invocation in wp_ajax based on processData set to false or true
  83. Stop unauthorised file access
  84. WordPress delete mysql rows with string
  85. How to display properly exception or echo string after posting in plugin?
  86. Get (eventual) permalink from post within Edit Post in Admin panel
  87. Plugin dev: How to multiply instances of a plugin in the same metabox?
  88. How to add conent (text) to Add New pages form of admin in WordPress
  89. Issue with iframe in TinyMCE
  90. Include add_post_meta in a plugin
  91. Post data in wp-admin to external database
  92. admin page passing $_POST variables to itself
  93. modify buddpress adminbar only in admin pages
  94. Loading jQuery library from WordPress admin
  95. How to change the headline title for an admin page in a plugin?
  96. How to prepend a header section to all pages related to my WordPress Plugin
  97. Load specific CSS file
  98. How to use native wordpress translation domain inside a custom plugin?
  99. Select a Text for CSS
  100. WordPress – Filter users list count
Categories plugin-development Tags plugin-development, plugin-wp-seo-yoast, post-meta, wp-admin
Should i use custom post type for a custom footer?
JQuery Issues With WordPress Theme Interface

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress