• When editing a post, I want to hide some elements from the right sidebar, like “Model”, “Permalink”, “Tags”, etc.
    In Chrome, using the inspector, if I add display: none for some element, it’s working.
    If I try the same with Admin CSS Module, it’s not working.
    How can I do that?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @rogeriodec have you try to use

    display: none !important;

    Hi @rogeriodec,

    That should work. But, it is the case of admin you can do that by a simple function. For reference
    `add_action(‘admin_print_styles’, ‘zworhtkey_custom_admin_css’);
    add_action(‘wp_enqueue_scripts’, ‘zworhtkey_custom_admin_css’);

    function zworhtkey_custom_admin_css() {
    if (is_admin()) {
    wp_enqueue_style(“custom-admin-css”, get_bloginfo(‘template_directory’). “/custom_admin.css”, false, false, “all”);
    }
    }’
    Hope that will fix your problem
    Thank You

    Thread Starter rogeriodec

    (@rogeriodec)

    I apologize, actually, the problem was a simple syntax error: I was leaving a comma after the class declaration: .myclass, {display: none}, when the correct one would be: .myclass {display: none}

    Thread Starter rogeriodec

    (@rogeriodec)

    Didn’t work as it should.
    Please, see this image:

    View post on imgur.com

    I want to hide the following elements:

      Post Format
      Author
      Template
      Permalink
      Tags

    For example, to hide the COMPLETE block of AUTHOR, I have this:

    View post on imgur.com

    But components-panel__row is a generic class and if I hide it, it will hide all other elements…

    If I go down some levels, I get the actual class post-author-selector, but if I hide it, it will leave a blank gap in the screen for that element.

    Could anyone test this?

    • This reply was modified 3 years, 2 months ago by rogeriodec.

    @rogeriodec Hi, I wanted to hide some elements like what you were planning to do so I’m just wondering if you already found out the solution?. If yes, can you please share with me since I’m also stuck on this. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to hide some elements of sidebar when editing posts?’ is closed to new replies.