WordPress.org

Ready to get started?Download WordPress

Forums

Adminimize
[resolved] Hide Options When Creating Posts (8 posts)

  1. JosiahW
    Member
    Posted 1 year ago #

    I do not want my authors or contributors to see some plugin options when they are writing a post. For example I don't want them to have the option of changing a "LoopBuddy" option that shows up in the add post.

    How do I go about doing this? If I need to put in some code how do I know what to put in for each plugin?

    http://wordpress.org/plugins/adminimize/

  2. JosiahW
    Member
    Posted 1 year ago #

    I figured it out.

    #divid.whateverbox

    Used firebug to find these.

  3. lilandzoom
    Member
    Posted 10 months ago #

    Hi JosiahW,

    I have the same problem, please explain how you solved it?
    Also, I want authors to be able to see their posts only. How can I hide the "All | Published | Trash" options at the edit.php page?

    Thanks!

  4. JosiahW
    Member
    Posted 10 months ago #

    I installed the firefox extension "Firebug". With that turned on I used the "element inspection" tool to find the element I wanted to disable. Once I found the element I entered that into adminimize.

    For example the element selection tool for "Featured Images" box is this:
    <div id="postimagediv" class="postbox ">

    So with that information I would go to adminimize "Your own Post options

    Featured Image in the "ID or class" box
    and
    "#postimagediv.postbox" in the "Option" box. (Don't include the "" just #postimagediv.postbox)

  5. JosiahW
    Member
    Posted 10 months ago #

    Adminimize does not yet have a feature for authors to only see their posts... for this I suggest a plugin called "Press Permit".

  6. lilandzoom
    Member
    Posted 10 months ago #

    Thank you JosiahW!
    It works great
    As for the second question, I figured it out. I added the following script to the functions.php file:
    function td_removeList(){
    global $current_user;
    if( current_user_can('edit_posts') AND !current_user_can('edit_users') ){
    ?>
    <script type="text/javascript">
    jQuery(function(){
    jQuery("li.all").remove();
    jQuery("li.publish").remove();
    jQuery("li.trash").remove();
    jQuery("li.future").remove();
    jQuery("li.pending").remove();
    jQuery("li.draft").remove();
    });
    </script>
    <?php
    }
    }
    add_action('admin_footer', 'td_removeList');
    add_action('admin_head', 'td_hideMenu', 1);
    function td_hideMenu() {
    global $current_user, $parent_file;
    if( current_user_can('edit_posts') AND !current_user_can('edit_users') ){
    remove_menu_page('tools.php');
    remove_menu_page('edit-comments.php');
    remove_menu_page('upload.php');
    remove_submenu_page('upload.php', 'media-new.php');
    if(isset($_REQUEST['post_status'])) $status = $_REQUEST['post_status']; else $status = "";
    if(isset($_REQUEST['all_posts'])) $all = $_REQUEST['all_posts']; else $all = "";
    if ( $parent_file == 'edit.php' AND $status<>"all" AND ( $status<>"" OR $all<>"" ) ) {
    if (headers_sent()) {
    echo '<meta http-equiv="refresh" content="0;url='.admin_url('edit.php').'">';
    echo '<script type="text/javascript">document.location.href="'.admin_url('edit.php').'"</script>'; }
    else { wp_redirect(admin_url('edit.php')); exit(); }
    } //redirect
    }//select
    }

  7. jameschai
    Member
    Posted 10 months ago #

    How would I go about removing the WOOCommerce button from displaying on the post page editor?

    I used firefox and found the following:

    class="mceIcon mce_woocommerce_shortcodes_button"

    Being that their is NO DIV tag how do I exclude it?

  8. jameschai
    Member
    Posted 10 months ago #

    Figured it out after a few hacks

    .mceIcon mce_woocommerce_shortcodes_button

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.