• Resolved mondalaci

    (@mondalaci)


    Hi there,

    When editing orders, there’s a sticky header featuring the “Edit Order” title and an “Activity” button, which occupies precious vertical space for no good reason. This header is also mentioned in the recent https://www.ads-software.com/support/topic/sticky-admin-headers/ post.

    This header can be disabled with the “Disable Bloat for WordPress & WooCommerce” plugin, which I used to use, but I want to minimize the number of plugins I use for performance reasons, so the sticky admin header reappeared.

    I strongly feel that there should be a native WooCommerce option to disable this header, perhaps under WooCommerce -> Settings -> Advanced –> Features. Is there such a way?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @mondalaci

    ?I would recommend just removing any elements you find distracting with CSS using the?admin_head?hook.

    I’ll leave a snippet to remove the example you mentioned:

    add_action('admin_head', 'my_custom_css');
    
    function my
    _custom_css() {
      echo '<style>
       .woocommerce-layout__header-wrapper{
    		display: none !important;
    	}
      </style>';
    }

    You can the snippet it to your child theme?functions.php?file or use a plugin like?Code snippet.

    If you’d like to learn more about CSS, I highly recommend using the free tutorials at w3schools. Here, you can find the basics of selectors (how to target the right element on the page), and properties (how to change the element on the page)

    Also, I would like to note that customization is not within our?scope of support?so if you need more help with this part, consider hiring a?WooExpert.

    Look forward to hearing back from you.

    ?

    Thread Starter mondalaci

    (@mondalaci)

    Hi @amiralifarooq,

    I appreciate your help. I’m a developer and know CSS and the WordPress API, so I’m not asking for customizations.

    I’m asking you to forward this issue to upstream because I strongly believe that the admin header is a misfeature, it shouldn’t exist to begin width, and at the very least, users should be able to disable it without any custom code.

    Hi @mondalaci

    Thank you for sharing your feedback and expressing your thoughts regarding the admin header feature in WooCommerce. We understand your perspective and appreciate your expertise as a developer.

    If you believe that the admin header is a misfeature and should not exist, or if you think users should have the ability to disable it without requiring custom code, we recommend submitting a feature request directly to the WooCommerce team. They have a dedicated feature request portal where you can share your ideas and suggestions for improving the core WooCommerce plugin.

    By submitting your feature request through the portal, you will ensure that it reaches the appropriate team members who can consider it for future development and implementation. They can evaluate the feasibility and potential benefits of the requested feature within the broader context of WooCommerce’s functionality and user experience.

    We appreciate your input and value your contribution to making WooCommerce even better.

    Cheers!

    Totally agree that this function is a mistake. It occupied part of my precious screen and block the button that should be showed when editing.

    And the provided CSS shows error when save to the function.php

    Your PHP code changes were rolled back due to an error on line 66 of file wp-content/themes/astra-child/functions.php. Please fix and try saving again. syntax error, unexpected ‘_custom_css’ (T_STRING), expecting ‘(‘

    Thread Starter mondalaci

    (@mondalaci)

    Saif

    (@babylon1999)

    Hello @honac,

    You can use the Simple Custom CSS and JS plugin to add just the CSS part. Make sure to select the (in admin) option so that the snippet doesn’t run everywhere.


    Link to image: https://d.pr/i/gykguO

    If you have any other questions, kindly create your own thread from here: https://www.ads-software.com/support/plugin/woocommerce/#new-topic-0

    Cheers!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to remove the sticky admin header natively?’ is closed to new replies.