Running Queries From Functions.php – Update, Let’s Keep This Thing in Check!

Back in August, I ran a little article about running queries from functions.php. We did a little pre_get_posts work, and a bit of a conditional stuff. Well, I learned a bit more since then, and you need one more essential piece of information! Let me key you in on that!

Continue reading

Set Your Featured Image Automagically From the First Image in the Post

Here’s a nifty trick that just came through my RSS reader. Let’s give credit where it’s due first because I didn’t come up with this! It came through my reader from the WP Snippets site, this post right here. We’re going to grab the first image from the post, and set it as your featured image automagically!

Continue reading

Development Tip: How to Know What Template is Being Used

I’ve been working on an overhaul of my personal blog for a while now. My old theme was pretty bloated, and way more than I needed since I offloaded everything away. The site used to have everything on it, but I moved all my WordPress posts to VoodooPress, and all my Voodoo Empire specific stuff to its own site. My blog doesn’t need all the features it had, and it was slowing things down. I haven’t had time to finish my custom theme, so in the meantime I decided to play around with some available themes, starting with Fanwood from DevPress. I have all of my custom stuff that used to be in the theme living in its own functionality plugin now. So I can activate any new theme, and within 20 minutes, have all my custom stuff in place. But the one problem I ran into – FanWood is a complex theme, not always using the standard WordPress templates I would expect – single.php for instance. Well, what’s an easy way to know what template is being loaded at all times? I’ve got the answer for ya!

Continue reading

Preserving Pagination With Query Posts – Why Do My Page 1 Posts Appear on Page 2?

So you’ve made a custom template of some sort, or you’ve tried to exclude a category from your home page. You used query_posts because that’s what all the cool kids are doing. But now when you click to go to the next page of your site, it says page 2, but you see all the same posts as page 1. Why is WordPress lying to you? Let’s take a look!

Continue reading

Send Your WordPress Email From YOU, and Other Email Fixes

I recently came across a problem where none of my emails were getting through to anyone, even me. Registration, comments, forms, etc. They were all hosed up. I’ve got a couple of tricks for you here that fixed things for me. This helped normal WordPress emails, Contact Form 7, Gravity Forms, etc. First I’ll show you how to send your email from YOU, not [email protected], then I’ll tell you what else I did that may be host specific.

Continue reading

Remove the Home Link From TwentyEleven’s Page Fallback Menu

Here’s a quick request. Hopefully by now most of us know how to use WordPress custom menu creator. It works great, and alloows for any type of menu to be created. But let’s say you are using twentyeleven, and you are totally happy with it. And, you don’t feel like making a custom menu… you want to stick with the default fallback, wp_list_pages. The only thing that bugs you is that pesky home link…. here’s the answer!

Continue reading

The Very Basics of SSH/Shell Access – Navigating Through Command Line

After migrating to Bluehost, or actually, while migrating, I came across a situation where I needed to use SSH to accomplish a task. In my case, it was importing a large mySQL database. There may come a time where you need to use SSH to complete a task. There are many great tutorials out there, but they all seem to assume a basic knowledge of using the command line. I’m not going to give you in depth knowledge here, just the very basics, how to get started and navigate around.

Continue reading

Time to Discuss Site Functionality Plugin Again

I’m going to borrow a page from Otto, and discuss a functionality plugin again. I hope you’ll read this article all the way through. I fully intend to help you make your WordPress life so much easier. We’re going to make a site-specific plugin, and I’ll even give you the bare bones for free! I avoided making my plugin for years, and realize how painful that made everything. These plugins are amazingly easy, and essential really.

Continue reading

Why Do WordPress PHP Commands Have TwentyTen (Or Any Theme Name) In Them?

It’s a question I see around the forums every so often. Why does my theme have twentyten, twentyeleven, theme name in all of the php commands? It’s a question I had when I was starting out. I would copy and paste things from other themes, and at first I had a variety of theme names in mine, and it didn’t hurt anything. Then I started changing it to match my theme name, and that didn’t hurt anything either. But it didn’t help, because I didn’t understand what it was. Well, here’s a quick explanation.

Continue reading