Here’s how to add a CSS class to the body tag of a single post or post type, based on the post category, in WordPress. Why would you want to do this? Maybe you want to add custom CSS styles to single posts in specific categories, but you don’t want to create a custom template […]
Add CSS Class To Single Post Based on Category In WordPress
Change the Bullet Color of a List Item with CSS
In web design, sometimes it is useful to change the bullet color of a list item to some other color besides the text color. We can do this using CSS. For example, perhaps you have a bulleted list, and you want to keep the text black, but make the bullets green. There is no CSS […]
Ordered Lists With A Different Color For Numbers
In HTML, there are two types of lists: ordered and unordered (ol and ul). Ordered lists have numbers for each list-item (li), while unordered lists do not have numbers. Unordered lists are generally used for many different things, like site navigation, widgets with links, bullet-point lists, or any place a set of links might show […]
Styling the Select Element Consistently in HTML
Getting different web browsers to show the same element the same way can be tricky, especially when it comes to form inputs. One of the most finicky HTML elements to style consistently across different browsers is the select element. Here are some tips for styling the select element to make it look the same from […]
Get the URL of a Featured Image in WordPress
Sometimes it is useful to get the URL of a Featured Image in WordPress, instead of just outputting the image itself as HTML. When would you use this? If you need to get the URL in order to use it for a background image, as in a header at the top of the page, for […]
Webkit Bug Fix: Slider Causes Font Weights To Change On Page
Every browser has it’s own idiosyncrasies. A browser quirk I found in Safari is directly related to pages with a slider located on the page. Specifically, when the slides animate, font weights of various HTML elements somewhere else on the page change when the slides animate. Weird, right? It turns out this is a bug […]
Add A HTML Sitemap To Your WordPress Site
Most of you reading this already understand the impact of search engine rankings. If you can rank high in Google, more potential customers find your business. The more prospective customers that find you, the more paying customers you should have. Except most of you are frustrated by search engine optimization (or SEO). There are actually […]
Fix Contact Form 7 Configuration Errors
WordPress site admins who use Contact Form 7 may have noticed configuration errors in Version 4.4. You’re not mistaken when you’re wondering if these errors weren’t there before. The most common misconfiguration error warning triggers if you are using a To or From email in your contact form with a domain name than your website. […]
HTML: Give Parent Div 100% Height Of Child Floated Elements
Many web designers and front end developers have been stumped by this dilemma before. When you have a parent div with only floated child elements inside, how do you give the parent element the height of the floated child elements? Before we look at the answer, let’s look at why this is a problem in […]
Create A CSS Sticky Footer
What is a sticky footer? And why would you need one? As you may already know, the footer is the area at the bottom of a web page. This area usually contains copyright information, social media and other links, and sometimes contact information. The problem is that occasionally, your site may have pages where the […]