Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1096734
    Moonworks
    Participant

    Could you tell me the CSS I would need to use to remove everything from the addons page except the import function please?

    The user will not be using anything except this function and it is just a nightmare to have it there, ready for them to play with and mess something up.

    As an example of what I’ve tried, I tried this:

    .tco-box-extensions {
      display: none !important;
    }

    But that didn’t do anything.

    Alternatively, is there a way to add the import function to the dashboard page and remove the addons page in the admin sidebar?

    Thanks.

    #1096786
    Christian
    Moderator

    Hey there,

    Please add the code below in your functions.php

    if (is_admin()) {
    echo '<style>.tco-box-automatic-updates,.tco-box-support,.tco-box-demo-content,.tco-box-extensions,.tco-cta{display:none;}</style>';
    }

    Thanks.

    #1096839
    Moonworks
    Participant

    Thank you, that’s done exactly what I needed.

    #1096930
    Joao
    Moderator

    Glad to hear it,

    Joao

    #1096960
    Moonworks
    Participant

    I just noticed that this causes a problem when tryign to import a file, it gives the message:

    The uploaded file was not a valid XCS export.

    Importing the same file without this showing goes through ok.

    #1096987
    Moonworks
    Participant

    I’ve also noticed that it is not possible to upload to the media library when this is in the functions file.

    Not sure why, looking at it.

    #1097104
    Christian
    Moderator

    Sorry. It should be

    add_action('admin_head', 'admin_only_styles');
    
    function admin_only_styles() {
      echo '<style>.tco-box-automatic-updates,.tco-box-support,.tco-box-demo-content,.tco-box-extensions,.tco-cta{display:none;}</style>';
    }

    Tested this on my setup and it works. If it still doesn’t work on your end. We recommend that you seek help from a web developer to assist you further or work closely with you as customizing the Addons or any backend tools is not recommended. The code given serves only as a guide.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1096734 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>