Responsive Width Element with Padding – CSS How-to

Padding Extends Beyond Parent Element

Have you ever had an element in your responsive website design which needed some padding, but you couldn’t add it because it broke the design? There’s a solution to that problem. Normally, the element in question will just add padding to the outside of itself, often expanding well beyond the space it is supposed to take up. But there is … Read More

Passing a PHP Variable to Javascript in WordPress: The EASY Way

Close Buildings

If you’ve made it here, odds are you’ve already been through the depths of the internet, full of “simple” tutorials talking about how easy it is to pass a variable in your PHP code to Javascript in WordPress. Maybe they even have simple, foolproof examples. The only thing is, they don’t work. WHY don’t they work? Who cares! They are … Read More

Dropdown List of Authors with Posts in Category – WordPress

While at first it may seem impossible, creating a dropdown list of all the authors with posts in a specific category is not actually all that difficult. This will work with custom taxonomies and custom post types as well, so it should suit the needs of just about anyone. Let’s get right to it! The Code:  

There are … Read More

Get ID of Current Category – WordPress

Getting the ID of the current category in WordPress is actually quite simple. This will work in category archive pages or anywhere a category has been queried. We are going to use get_queried_object() to accomplish this task. The following script will get all the information about our queried object and put it in an array, $category. Then we are simply … Read More

Padding or Margin Only Affects First Line of Text – CSS

A common problem when formatting your website with CSS is that the first line of text in a paragraph, header, or link is affected by margin or padding while the remaining lines are not. It may even appear as though the first line is indented in some cases while none of the others are. Solution for padding or margin only … Read More

Authors Loop with Links to Pages – WordPress Tutorial

Creating the loop for a page that displays all of your authors in your WordPress website is something that’s not as straight-forward as you would think it would be. Additionally, actually linking to the author’s page is fairly tricky. So today I am going to show you how to do it. You can take the final code and put it … Read More

Dropdown Menu of All Terms in Custom Taxonomy – WordPress

Built-in to WordPress is a nifty function, wp_dropdown_categories, that is supposed to list all your categories in a drop-down menu and, with the right script, link directly to them. It even has an argument for using it with a custom taxonomy. The only thing is, it doesn’t work. It doesn’t produce the appropriate link. It appears to produce a link like /?cat=# … Read More

How to Open Layer By Itself in New Document – Photoshop

One thing that comes up a lot for me while building websites based off Photoshop designs, is that I need the ability to quickly and easily edit a layer by itself, as its own document, and then be able to export that file by itself as well. So how can we do that? I am using Photoshop CS5 though this … Read More

Custom Post Type – Title and Editor Not Displaying – WordPress Tip

If you’ve been working on adding a custom post type into your WordPress theme, only to fall flat when, inexplicably, the title and editor in the post edit screen have disappeared, have no fear! Here is the common cause. If you don’t add ‘supports’ => array( ) into your custom post type registration, then at the very least WordPress assumes … Read More

Display Posts with 2 or More Tags – WordPress Tutorial

It’s amazing how difficult it is to Google how to do this exact thing, but it’s so simple. But there are already pages linked into your WordPress site that will display all your posts that are tagged with multiple things. You just need to know how to link to it! Here is an example: Example: Link to all of my … Read More