Filtering the Smartcrawl Metabox

Hello,

We are using the Smartcrawl Metabox to provide our customers a way to edit their pages titles, description, etc.

We are currently hiding with CSS the fields of the metabox that are too complicated for our customers (like canonical & robots)

Would it be possible to add filters to allow us to choose which group of fields to hide ?

Plus, could you please add gettext for "Preview" in /wpmu-dev-seo/wds-files/wds-core/admin/wds-core-metabox.php at line 79 ?

Thanks a lot and have a nice day

  • Rupok

    Hi mistermuffin

    Hope you had a wonderful day.

    You can enqueue different CSS to hide different fields according to user role by creating a MU Plugin. For creating a mu plugin, create a folder named "mu-plugins" inside your "wp-content" folder. Then inside that "mu-plugins" folder, create a file with any name and with a .php extension. Now paste the code inside that file and save.

    <?php
    add_action( 'wp_head', 'hide_job_fimg' );
    function hide_job_fimg() {
    if(current_user_can('editor')){
        ?>
    		<style type="text/css">
    		// Your Custom CSS Code for Editor
    		</style>
        <?php
        }elseif(current_user_can('admin')){
        ?>
    		<style type="text/css">
    		// Your Custom CSS Code for Admin
    		</style>
        <?php
        }
    }

    For getting more idea on mu plugins, you can go through this article: https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Please let us know if you have any trouble using this. We will be glad to help.

    Have a nice day. Cheers!

  • Rupok

    Hi mistermuffin

    Any code that runs from inside a MU Plugin, will also work from functions.php . But we always prefer MU Plugin so you don't have to put it again when you change your theme or your theme gets updated.

    Plus, could you please add gettext for "Preview" in /wpmu-dev-seo/wds-files/wds-core/admin/wds-core-metabox.php at line 79 ?

    I do apologize, I missed this line. I'm flagging our developer here as he can give you better feedback on this. Please keep in mind, our developers work round the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and provide a feedback.

    Have a nice day. Cheers!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.