Why should I password protect WP-Admin?

The protection from .htaccess is for the folder /wp-admin it’s not for the URL Open up your ftp programme (or download WordPress) and look inside /wp-admin By only allowing your IP access this folder you’re blocking a lot of possible exploit issues (as mentioned in comments below). I always prefer to login at mysite.com/wp-admin and … Read more

Enqueued Stylesheets Effecting Admin Styles

You could do it like this: function theme_styles(){ /* * This if() statement is unnecessary, as wp_enqueue_scripts * doesn’t fire on the admin pages. * if( is_admin() ) { * return; * } */ wp_enqueue_style( ‘theme-styles’, get_template_directory_uri() . ‘/css/all.css’, array(), false, ‘all’ ); } add_action( ‘wp_enqueue_scripts’, ‘theme_styles’ ); References is_admin() Also, note that the wp_enqueue_scripts … Read more

How to add post_author column to custom post type

The $supports argument should include author for the Author settings to be available for the custom post type: ‘supports’ => array( ‘title’, ‘custom-fields’, ‘author’ ) ‘supports’ (array) Core feature(s) the post type supports. Serves as an alias for calling add_post_type_support() directly. Core features include ‘title’, ‘editor’, ‘comments’, ‘revisions’, ‘trackbacks’, ‘author’, ‘excerpt’, ‘page-attributes’, ‘thumbnail’, ‘custom-fields’, and … Read more

Always show same size tags for Tag Cloud in WordPress Admin

use this at functions.php /* Tagcloud, change the font size */ function custom_tag_cloud_widget($args) { $args[‘largest’] = 13; //largest tag $args[‘smallest’] = 13; //smallest tag $args[‘unit’] = ‘px’; //tag font unit return $args; } add_filter( ‘widget_tag_cloud_args’, ‘custom_tag_cloud_widget’ );

Retrieve Path of admin.php

You can use admin_url() function for wp-admin.css file and ABSPATH for admin.php. $admin_php_path = ABSPATH . ‘/wp-admin/admin.php’; $admin_css_url = admin_url( ‘css/wp-admin.css’ );