Hide Pages on Edit Pages based on Capability (edit_others_pages)?

I was using the wrong query_var. It’s author not post_author. add_action( ‘pre_get_posts’, ‘wps_admin_exclude_pages’ ); function wps_admin_exclude_pages( $query ) { if( ! is_admin() ) return $query; global $pagenow, $user_ID; if( ‘edit.php’ == $pagenow && ‘page’ == get_query_var( ‘post_type’ ) && ! current_user_can( ‘edit_others_pages’ ) ) $query->set( ‘author’, $user_ID ); return $query; }

Apply permissions per post

If you look at WordPress’s explanation of Roles and Capabilities, you will see that the correct role you should have assigned them is Author. That being said, if you for some reason don’t want to change them to Authors, you can alter the capabilities that a role has. See the full list of Editor capabilities … Read more

Make the Status, Visibility, or Date fields opened by default in the Publish box

This jQuery code seems to work, when added via the admin_footer hook. #submitdiv = the whole Publish metabox .misc-pub-section = each UI section (except the Publish and Save sections) .hide-if-js = the fields that are hidden by default $(‘#submitdiv .misc-pub-section’) .has(“#post-status-display, #timestamp”) .find(‘.hide-if-js’) .toggle(); That will unhide the Status dropdown and the Date picker.

My WordPress Admin looks messed up when I edit posts or pages

Ultimate TinyMCE adds extra toolbar buttons to your post content editor. On your screenshot, these extra buttons are extending over into the right sidebar column. If you want to continue to run Ultimate TinyMCE and have these extra toolbar buttons, you have two options: At the top of the Edit Post screen, go to Screen … Read more

Adding html format on tinymce visual editor

I Googled wordpress mce filter, and it led me pretty directly to a TinyMCE Custom Styles tutorial on the Codex. It’s not a simple thing — you have to, for starters, enable a hidden button in TinyMCE called styleselect — but it looks like the tutorial is fairly complete. Is that what you’re looking for? … Read more

Admin toolbar shows up when not logged in

Apparently the W3 Total Cache plugin caused this problem. I tried removing the toolbar via CSS by using display:none;. When this didn’t worked, I found that the CSS that styled the toolbar was in one of the cache folders of this plugin.

How do I add an admin notice within javascript in the admin interface for posts?

Look at F:\sites\wp-git\wp-admin\js\common.js: $(‘div.updated, div.error’).not(‘.below-h2, .inline’).insertAfter( $(‘div.wrap h2:first’) ); If your notice has the class updated or error, it will be set after the first h2 automatically. When you create custom messages, make sure you are using one of these classes. Then you can just append them to body, and WordPress will move them to … Read more