Admin interface problems – thickbox? jquery?

Have you disabled all plug-ins to rule out a jquery conflict?. Do you have any custom scripts that you are registering in your theme? If so are you using: if( !is_admin()){ to ensure it’s not loading on the back-end?

Admin – Load existing admin template as a submenu page

You can add an interal link quite easily, it’s the same approach you use for adding custom items, you simply exclude a callback function and set the menu slug to the applicable URL, here’s an example. add_action( ‘admin_menu’, ‘add_user_type_link’ ); function add_user_type_link() { add_submenu_page( ‘users.php’, ‘Customers’, ‘Customers’, ‘edit_users’, ‘users.php?role=customers’ ); } Adjust the code as … Read more

Where should I hook into admin?

Not sure about the Membership plug-in bit, but admin_init will be your best bet. I assume that you don’t actually what to hook into the admin header though – this would be admin_head or admin_head-(plugin_page) – but you cannot redirect after these hooks (headers already sent).

Instructions for a custom post type

You should be able to add help tabs with add_help_tab(). You’ll need to filter which page you add it to based on the data returned by get_current_screen(), but that’s simple.

Hide one admin from another admin

add_action(‘pre_user_query’,’yoursite_pre_user_query’); function yoursite_pre_user_query($user_search) { global $current_user; $username = $current_user->user_login; if ($username == ‘<USERNAME OF OTHER ADMIN>’) { global $wpdb; $user_search->query_where = str_replace(‘WHERE 1=1’, “WHERE 1=1 AND {$wpdb->users}.user_login != ‘<YOUR USERNAME>'”,$user_search->query_where); } } Replace text with the actual usernames of the users involved. You can also modify this to hide one admin from all other users … Read more

How can I show the contents of only a few users

To show content only for users with role ‘agent’, try to use this snippet: <?php if ( ( $user = wp_get_current_user() ) && in_array( ‘agent’, $user->roles ) ) { ?> ///here the content <?php } ?> If you want to block users by ID, check the following snippet: <?php if ( ( $user = wp_get_current_user() … Read more

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

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