Posted by & filed under WordPress.

You know, the one typically at yoursite.com/wp-login.php. These are things you would put in the active theme’s functions.php file. Change the Logo Is the WordPress logo by default, this changes the file path of that image. Change file path and file name to your own needs. function custom_login_logo() { echo ‘<style type=”text/css”>h1 a { background:

Continue reading →

Posted by & filed under WordPress.

Make your WordPress version tag hidden. Put in functions.php file in your theme: remove_action(‘wp_head’, ‘wp_generator’);

Posted by & filed under WordPress.

Usage Use [year] in your posts. Snippet Place the code above in functions.php file function year_shortcode() { $year = date(‘Y’); return $year; } add_shortcode(‘year’, ‘year_shortcode’);

Posted by & filed under WordPress.

Sometimes you need sub-categories to inherit their parent’s archive/category template. But it’s not supported by default. Here is a little filter that does that for you! function new_subcategory_hierarchy() { $category = get_queried_object(); $temp = $category; do { $parent_id = $temp->category_parent; $temp = get_category( $parent_id ); } while ( $temp->category_parent ); $templates = array(); if (

Continue reading →