How to put placeholder text in the main post input area?

You can change ‘post’ to which ever post type you want to apply the default content to. add_filter( ‘default_content’, ‘wpse57907_default_content’, 10, 2 ); function wpse57907_default_content( $content, $post ) { if ( ‘post’ == $post->post_type ) $content=”Use this area to write an introduction to the course…”; return $content; } Edit I’m not sure you can add … Read more

How to minimize WP dashboard menu programmatically?

Add a javascript to all admin pages: add_action( ‘admin_print_scripts’, ‘auto_collapse_menu’ ); function auto_collapse_menu(){ wp_enqueue_script( ‘autocollapsemenu’, plugins_url( ‘autocollapsemenu.js’, __FILE__ ), array( ‘jquery’ ), false, true ); } The javascript: jQuery(document).ready( function($){ // catch every click inside element with ID ‘adminmenu’ $( ‘#adminmenu’ ).click( function(e){ // true if the menu is folded, false if not var bodyFolded … Read more

Add menu page on multisite

I believe you’re looking for the network_admin_menu hook. Here’s how you’d use it: add_action(‘network_admin_menu’, ‘function_name’); function function_name() { add_menu_page( “page_title”, “menu_title”, ‘capability’, ‘menu_slug’, ‘function_callback’ ); }

Edit Page or Post from Top Admin Bar

Typically most themes will include an edit link on the post/page itself that takes you directly to the backend to edit the post. If not, you can always add it yourself with code similar to the following in single.php, page.php, etc.: <?php edit_post_link(‘(Edit this post)’, ‘<p>’, ‘</p>’); ?> (See http://codex.wordpress.org/Function_Reference/edit_post_link for more details.) Also, check … Read more

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