How to Create a Custom Post Types in WordPress

When we install WordPress, we only get three built-in content types at the backend, i.e. posts, pages, and media. However, today WordPress has become quite flexible and advanced. Therefore, the approach to adding more post types have also diversified. The diversified usage demands more content types because posts, pages, and media are not enough and here is … Read moreHow to Create a Custom Post Types in WordPress

Duplicating WordPress Page or Post Without Plugins

/* * Function for post duplication. Dups appear as drafts. User is redirected to the edit screen */ function rd_duplicate_post_as_draft(){ global $wpdb; if (! ( isset( $_GET[‘post’]) || isset( $_POST[‘post’]) || ( isset($_REQUEST[‘action’]) && ‘rd_duplicate_post_as_draft’ == $_REQUEST[‘action’] ) ) ) { wp_die(‘No post to duplicate has been supplied!’); } /* * Nonce verification */ if … Read moreDuplicating WordPress Page or Post Without Plugins

Custom Admin Login logo

Change the blue WordPress logo that is branding your various login pages? Create your custom login image, name it “custom-login-logo.png”, and upload it to your theme’s /images/ directory. This code will take care of the rest: // custom admin login logo function custom_login_logo() { echo ‘<style type=”text/css”> h1 a { background-image: url(‘.get_bloginfo(‘template_directory’).’/images/custom-login-logo.png) !important; } </style>’; } add_action(‘login_head’, … Read moreCustom Admin Login logo

Add a favicon to your blog

function blog_favicon() { echo ‘<link rel=”Shortcut Icon” type=”image/x-icon” href=”‘.get_bloginfo(‘wpurl’).’/favicon.ico” />’; } add_action(‘wp_head’, ‘blog_favicon’); // add a favicon for your admin function admin_favicon() { echo ‘<link rel=”Shortcut Icon” type=”image/x-icon” href=”‘.get_bloginfo(‘stylesheet_directory’).’/images/favicon.png” />’; } add_action(‘admin_head’, ‘admin_favicon’);