WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to customize the publish metabox? (3 posts)

  1. naastje
    Member
    Posted 1 year ago #

    Hey guys,

    Does anyone know how can you customize the publish metabox? I have the seo by yoast plugin installed, but it's showing this SEO Check line on in the publish metabox, I would like to disable it/remove it/hide it. Is there anyway to do that?

    I've already tried Adminimze, no luck (I also tried to add global setting new class #misc-pub-section misc-yoast misc-pub-section-last)

    and this in my function.php but also no luck

    'function hide_all_post_page_options() {
    global $post;
    $hide_all_post_options = "<style type=\"text/css\"> #misc-pub-section misc-yoast misc-pub-section-last, #wpseo_linkdex { display: none !important; }</style>";
    print($hide_all_post_options);
    }
    add_action( 'admin_head', 'hide_all_post_page_options' );'

    I would rather not want to remove the seo plugin.

  2. bcworkz
    Member
    Posted 1 year ago #

    If a plugin can add it in, you should be able to remove it, but you need the exact code used to add it in the first place to remove it. It is most likely added with an add_action() call (or possibly add_filter). If you can find where and how this is done, you can use remove_action() or remove_filter() to undo it by hooking into an action that fires after the plugins are loaded.

  3. naastje
    Member
    Posted 1 year ago #

    Thanks for your reply, I ended up using the Adminmize plugin, not exactly what I wanted as I don't like using plugins for small tasks, but it works :p and I also wanted to disable the quick edit from page's just for one user, but I disabled it for everyone using that plugin, not exactly what I wanted as well, but it's better than nothing and I'm using a plugin for 2 tasks.

    Specific for SEO by Yoast this code add_filter( 'wpseo_use_page_analysis', '__return_false' ); does turn off all of the plugin's metaboxes

Topic Closed

This topic has been closed to new replies.

About this Topic