SmartCrawl Pro hide meta box.

Is there a way to hide meta Analyzer on all pages even creating new ones for all other user accounts, except mine. Please check and help.

  • Adam Czajczyk
    • Support Gorilla

    Hi Jason

    I hope you’re well today and thank you for your question!

    The simplest way to achieve it would be to hide it with CSS based on current user ID. Adding this code to the functions.php file of your theme should do the trick:

    add_action( 'wds-editor-metabox-seo-analysis', 'my_hide_seo_analysis' );
    function my_hide_seo_analysis() {

    if ( get_current_user_id() <> 1 ) {

    echo 'TEST: ' . get_current_user_id();

    ?>
    <style type="text/css">
    .wds-seo-analysis-container {display:none;}
    </style>
    <?php
    }
    }

    You might need to adjust the user ID though. In this line:

    if ( get_current_user_id() <> 1 ) {

    the number is a user account ID so you’d need to replace 1 with your account ID. You can find that ID either by looking at the users list (hovering over username would show an URL containing the ID) or by finding the user account in the db and checking ID there.

    Best regards,

    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.