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. How can I add an image upload field directly to a custom write panel?
  2. Post meta vs separate database tables
  3. Is it possible to reuse wp.media.editor Modal for dialogs other than media
  4. How do i best handle custom plugin page actions?
  5. How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?
  6. Plugin API for easy admin list table generation, handling & exporting of MySQL tables?
  7. Export data as CSV in back end with proper HTTP headers
  8. Completely remove WP_Admin_Bar for specific user roles
  9. API to trigger prompt on leaving page
  10. Show message on wordpress admin dashboard
  11. Hook the Keydown Event in the TinyMCE Post Editor
  12. Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?
  13. how to use thickbox in admin?
  14. How do you create a custom edit.php / edit pages page
  15. Cancel post save
  16. Add a jQuery function to admin pages
  17. Save metabox with multiple checkbox array
  18. Is it save to require plugin.php early to be able to use get_plugin_data() earlier?
  19. WP Cron doesn’t save or in post body
  20. Create a clickable name in WP_List_Table for Plugin Admin
  21. How to enable users to down-vote in this simple voting counter (that uses the post meta)?
  22. Filters ‘request’ and ‘parse_query’ not firing in sites.php nor link-manager.php
  23. URLs of plugin resources?
  24. Problems with removing admin bar
  25. Check if I am in the Admin Panel (wp-admin)?
  26. How to add custom content under plugin row in WordPress admin plugin list?
  27. How to put placeholder text in the main post input area?
  28. How can I free up the memory used by update_post_meta?
  29. Is there a way to list tags order by post_meta field
  30. How to load the plugin only when logged in?
  31. How to redirect to action on custom page within admin section
  32. Plugin development: get_post_meta is not working [closed]
  33. Ordering posts by metadata
  34. WP AJAX is not working, always returns 0
  35. Add notification bubble notice in navigation using transients
  36. Can I individually style items in the backend widget list?
  37. Act on user meta updated, but only once
  38. How to run a external JavaScript file on wp-admin if admin, and other if normal user?
  39. add a class when login
  40. Add a panel to edit post
  41. Where should I put “run once” plugin pages?
  42. How to check if Woocommerce Order number equals to post ID?
  43. Using the default wordpress uploader inside plugin
  44. Modify users.php page to create page/post on button clicked
  45. Issue plugin commands in admin settings page
  46. Any problem in using native jquery ajax style instead of using admin-ajax.php?
  47. maintaing consistent layout wordpress dashboard
  48. Replacing Scripts in Admin Load_Scripts
  49. update post meta for checkbox in the admin when inserted in the front-end
  50. Programmatically modify an admin page UI of a WordPress site from my WordPress plugin
  51. 403 Error when text is pasted in Custom Metabox Textarea
  52. Problems with: manage_${post_type}_posts_columns
  53. Global State During an Admin Post
  54. Render content after post title in wp-admin
  55. Saving value of a selection option in comment form as comment meta
  56. On cliking add new post redirect user to a custom page first
  57. Add a Save Button to Custom Meta Box [duplicate]
  58. Plugin with action ‘save_post’ needs to press publish twice on order to publish
  59. What should happen when a WordPress Plugin is activated across the network (Network Wide Activation)
  60. Prevent third party plugin’s admin page access based on user type
  61. How to add WordPress Admin “Insert Link” UI (searches through existing posts for URL) and functionality into a custom plugin?
  62. Is it possible to restrict all admin pages except theme customisation and storefront using plugin?
  63. Admin – Handle data before creating or updating a post, page or custom post
  64. wp_filesystem put_contents issue with owner/group
  65. Password field is empty when using wp_signon();
  66. Doubts about the use of metadata and how this can affect performance on WordPress
  67. How can I replace content in the WP Admin area before an admin page is rendered?
  68. update_post_meta not working in a loop
  69. Run Shortcode of post’s custom field in functions.php / Plugin
  70. Using ReactJS in the WordPress admin for plugin development
  71. Get draggable widgets on Edit Post page
  72. template_redirect or admin-ajax.php?
  73. Creating Admin Plugin – Content of a page is displayed at global scope as well
  74. How to load library scripts in admin from plugins in noConflict wrapper?
  75. Show error message after exception handled
  76. Issue with contextual help overwriting existing content
  77. Enqueue script globally
  78. Alternatives to DISALLOW_FILE_EDIT wp-config Constant? It Breaks Some Plugins
  79. How do I add a favicon that only shows during viewing of my plugin’s admin panel?
  80. How do I link to a php file in my plugin directory?
  81. WordPress Admin Login Custom Logo
  82. How to create custom settings page for custom plugin
  83. 400 Bad Request, in wordpress theme development, wp_ajax
  84. How to import the css in the plugin admin area?
  85. Creating multiple wp_editer() text fields in for loop — the text/visual switch only works for first editor
  86. Displaying “One Time” Notification in Plugins
  87. Wp-admin Custom User Management
  88. Admin Subpages without Menu entry
  89. How to add custom options for plugin into the add post screen – like yoast seo
  90. Filter for admin (back end) ‘reply to’ comment
  91. WP nonce field checkbox prints checked=’checked’ outside input field
  92. Ajax: Populate with content from a post’s ID not working – duplicating current page html instead
  93. Data not insert and update through ajax and jQuery in admin page?
  94. Update Cache on Save Instead of Clearing It?
  95. Create child of child custom page in wp-admin
  96. Load specific CSS file
  97. How to use native wordpress translation domain inside a custom plugin?
  98. Select a Text for CSS
  99. WordPress – Filter users list count
  100. Customize Message
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
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 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