Capability to read/edit page in wp-admin only for administrators

Thanks brasofilo! add_action( ‘pre_get_posts’, ‘hide_pages_to_user_except_admins’ ); function hide_pages_to_user_except_admins( $query ) { if( !is_admin() ) return $query; global $pagenow; $pages = array(‘201′,’38’,’99’); //page ids if( ‘edit.php’ == $pagenow && ( get_query_var(‘post_type’) && ‘page’ == get_query_var(‘post_type’) ) ) $query->set( ‘post__not_in’, $pages ); return $query; }

Add Sort Link in Custom Post Type List

Already got it: add_action( ‘views_edit-post’, ‘remove_edit_post_views’ ); function remove_edit_post_views( $views ) { $views[‘pre’] = ‘<a class=”‘.$class.'” href=”‘.admin_url().’edit.php?yourlink”>Name of Sort</a>’; return $views; } Thanks!

User interfaces living in the Admin “back end” area

I think User interfaces in WordPress Admin is a good idea. It will straight away gives different views for different groups(like editors, subscribers etc..). I also think Custom post types and custom fields are introduced for this purpose. On the flip side you wouldn’t be able to completely change the look of Admin area, so … Read more

Customise the add media pop-up to include rel attribute option

This is a tough one, but I would start here: Add new “Insert Into Post” button with another function. Below is some code to get started with adding the field via http://rider.sofarider.com/wordpress-tips-and-tricks/extra-input-field-to-add-an-image-panel/ From there, try something like the second code block. <?php function attachment_url_extra( $form_fields, $post ) { // input field relates to attachments // … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)