Hack: Alter Post Title Tag Depending On the Category

So yesterday I showed you how to change the post title, as in the H1 tag of the post page, based on the category of the post. That doesn’t change the title tag, however. Users don’t see or pay attention to the title tag as much, especially with browser tabs only offering limited space for them. But search engines see these and use them in search results.

Continue reading “Hack: Alter Post Title Tag Depending On the Category”

Hack: Adding Google Analytics Without Editing the Header File

What is the right way to add Google Analytics code? I’ve done it in the past by simply placing the code in the header.php file of my theme. This makes a lot of sense, especially if you have created your own theme or so extensively edited an existing one that you aren’t use a child theme at all, just your own version of the theme.

Continue reading “Hack: Adding Google Analytics Without Editing the Header File”

Hack: Creating Child Themes

A child theme is a theme that inherits all of the files of a parent theme, but allows you to add additional styles, functions and replacement template files. You can use a child theme to modify the parent while leaving the files untouched. This way the parent can receive updates without overwriting your modifications. You can also then see more clearly what changes you have made.

Continue reading “Hack: Creating Child Themes”

Hack: A Beginner’s Guide to Editing Your Theme Functions File

The hacks at this site are usually accomplished by adding your own custom plugin or editing the functions.php file. But what if you have never done that before and have little or no coding experience? The easiest way to add many hacks is to use the WordPress Dashboard and edit the Theme Functions (functions.php file), simply adding your code to the end. Here is a video tutorial for beginners.

Continue reading “Hack: A Beginner’s Guide to Editing Your Theme Functions File”