It’s 2015. Where did the year go? I’ve actually gotten emails from people throughout this past year, asking me to “come back to blogging”, and to “revive my site”. I notice the last time I posted anything here was mid-2013. Oh, how I have let things slide.

My past year was full of uncertainly, and ADHD-like behavior. I’ve signed up for a gazillion email newsletters, and have yet to read any of them. I’ve tried a gazillion methods of keeping track of things and organization, and they all fell by the wayside within a week. My 2014 (and clients aside – because all I’m complaining about currently is more of how I apply my awesome organizational skills. Can you feel the sarcasm there?) was ups and downs, and felt like a frazzled mess.

There are big changes coming, and coming very, very soon. I’m hoping these changes will give me room to breathe, to be more organized, and to let me apply my skills much more efficiently. I’ve learned a lot of cool new things in the last 18 months, and I’d love to share them with you – and update a lot of the old stuff that’s been stagnating here.

I cannot promise I will be a better blogger – I honestly never felt I was very good at it. But I can promise that when I post things, they will be more useful and helpful than the last 18 months have been. If anyone’s actually stuck with me, I thank you (and boy, are you loyal!), and you’ll be seeing some sweet changes here soon that hopefully are worth the wait.

My Goodness, I’ve been busy!

Pathetic excuse, I know. But I’ve been doing a little “housecleaning” around here. I’ve noticed that my site is a wee bit broken in areas, and I just haven’t had the chance to come along and fix it. My stuff always seems to take the back seat to everyone else! Such is life :)

In any case, some changes are forthcoming. Please be patient with me :)

Extra Info on Creating WordPress Themes

Anthony, over at Maddison Designs, happily reminded me this morning that I needed to update my tutorials on creating WordPress themes. He is such a sweetheart – he said he actually learned how to do it himself from a tutorial I wrote eons ago. I caught him in a discussion on Twitter with someone else, talking it over, and I realized exactly how old the tutorials were (the first is now over 6 years old, while the second run is over 3).

Yes, I should be updating these things more often, but honestly, I didn’t know so many people actually still read these things! So here I am, giving it another update.

The funny thing is, even as old as these tutorials are, they still apply. I wrote the original tutorial for WordPress 2.x – I can’t honestly even remember exactly which version it was, it was so long ago. (The top of the tutorial says it was for 2.0, but even so, I’m not even 100% sure it was exactly that version.) The second run was for 2.8. We’re now just starting to enjoy the loveliness that is 3.4.

Honestly, the second tutorial is quite a bit more comprehensive, and is closer to what I use today. There’s a few additions now – like the inc folder (which usually contains the widgets.php file), child themes, MultiSite, and custom post types/taxonomies. I really don’t want to go into all the old stuff, since it’ll just be re-hashing everything I’ve already written. But I’m more than happy to go over the new stuff.

Unfortunately, I haven’t had much of a chance to work with MultiSite. No opportunities have come my way on that end, so I’m going to have to regretfully pass on discussing that, since I simply don’t know enough about it yet. I only tried MultiSite once in my career, and the site I used it for ended up shutting it down within a few months (not because of the site, but because the business it was going to be used for shut down.) There wasn’t a whole lot I got to do with it, and it was long before you could simply activate MultiSite from a single installation with a line in wp-config.php. Someday, however, I will dive into it. (Maybe it’ll end up being the trend for 2013!)

inc/ folder and Widgets.php
I can go over the inc/widgets.php very quickly. Personally, I don’t use it. Most of the widgets I write are “general purpose”, meaning that if the client ends up changing the theme, I want them to continue using the widgets at hand, so I write a plugin instead. That way, the widgets remain, even if the theme changes. When you use the inc folder within the theme files, then as soon as you change the theme, the widgets go away (unless you write them/’port them over into the new theme).

Now, this is actually a good thing, if you’ve written custom widgets that are theme-specific. If you do, it’s pretty simple: simply open up your functions.php file and add this line to the top:

require( dirname( __FILE__ ) . '/inc/widgets.php' );

Pretty simple, eh? This is a nice little trick you can do, too, because if you have other code, etc. that you’d like to have better organized within your theme files, you can pretty much do this for anything. Just pop your file into the “inc” folder” and call it in – then you can WordPress it up :) (This has come in really handy for when I did directory sites – I can put in all those directory-related files into the inc folder and not get them confused with the theme files.)

You certainly don’t want to try and “organize” your template files though, because doing so will mess with how things are displayed, since WordPress looks for the files in your theme first, and if it doesn’t find them, uses twenty eleven’s stuff instead. But for anything you want to add, it’s wonderful.

Child Themes
Child themes are pretty new to me, to be honest. Like MultiSite, they haven’t come across my path quite yet. I will share what I know, but I can’t promise to have a full understanding of them, and I won’t be providing full-on tutorials on them yet.

The very simplest explanation of a child theme is from the Codex:

A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of that parent theme.

Clear as mud, right? To me, it pretty much sounds like regular themes – where you can create a new file that corresponds to some page, category, archive, custom post type, what have you; and then write additional functions that you can plug into the inc folder, right? How are they any different from regular theme files?

The thing is, let’s say you bought a theme from theme forest or something. The theme is so very close to what you need, but there’s some functionality you have to have that the purchased theme does not provide. And what happens if you use that theme, make massive edits to it to customize it to your needs, and then it’s upgraded? Everything’s overwritten, and all of it’s gone (or you have to go back to your backup and re-import all your edits).

That’s where child themes shine: you can customize an existing theme and not worry about it getting overwritten. You can use the stuff thats’ there, and simply add to it to make it suit you, and not touch the regular theme files.

To create a child theme (of an existing parent), you simply have to make the addition of a single line in the style.css file of your child theme folder: “Template”. In the top of your style.css file, where you have to put in the theme name and decscription (so WordPress understands what it is and uses it), you just add in the “Template” links, and set the name of the directory of the parent theme.

So, for example, say I bought the “Slab Theme” from Theme Forest.(no, I have no affiliation with either of these – I just thought the thumbnail was pretty.) You put the theme in your WordPress “themes” folder. Create a new theme (with your standard files: stye.css, header.php. functions.php, footer.php, sidebar.php, and index.php) and in the top of the style.css file, you pop in:

Template: slab

in that commented-section. Bam, now you can use all the functionality and style of the slab theme, but customize the crap out of it.

In other words, instead of using Twenty Eleven as the default fallback, it’ll use Slab. With the added bonus of also allowing you to use all the functionality and styles of Slab without making specific callbacks to it – you just use them.

Hopefully that makes sense :)

Custom Post Types and Taxonomies
Now THIS is where I’ve been getting a lot of experience in. First off, I want to tell you that WP Alchemy (for meta boxes) and Advanced Custom Fields are two AMAZING plugins that will pretty much do anything you need.

However, the reason I’ve become so good at writing my own custom post types and taxonomies are because of the plugin writing I do. I don’t want any of my plugins to be dependent on someone else’s work, so I manually write them up myself.

Creating custom post types really isn’t that difficult. The Codex has an excellent explanation on how to pull it off, and I don’t think I could add to it to make it any better.

The trickiness in custom post types actually comes with just a couple of things- where I’ve had to sort it out with trial and error. Mostly it has to do with taxonomies (and displaying /querying them), but there’s a bit of an issue with the “query_var” and “rewrite” sections of creating a custom post type. The codex has gotten a lot better in explaining these two – because originally they were just boolean values. But if you just use boolean values, you kind of get some weird output.

‘query_var’ is to simply set the term you want to use when querying the custom post types. Like when you use query_posts to grab the “cats” category, you’ll want some term to query the custom post type. Now, by default (if you just set query_var to “true”) it’ll use the name you gave the custom post type when you registered it.

register_post_type('campaign_posts', array(

by default, the query variable is ‘campaign_posts’, so when using query_posts, you’d put in:

query_posts(array('post_type' => 'campaign_posts'));

But, if you set the ‘query_var’ to something else (say, “campaigns”) then you can

query_posts(array('post_type' => 'campaigns'));

And that will work, too.

I suppose it’s a bit pointless, because you can just register the post type as whatever you want to name it, but sometimes it comes in handy.

“Rewrite” confused me for the longest time (what can I say, I work a lot without coffee), because you can use either a string or a boolean value. “Rewrite” has to do with your permalinks. It looks like so:

'rewrite' => array( 'slug' => 'campaigns', 'with_front' => true ),

there’s a couple of other attributes you can pop in there, but these are the two you will use the most. Basically, “slug” is the slug you’ll see in the URL when you’re on a custom post type. “with_front” is whether or not you want the additional settings in your permalinks to show up, or make it look like it’s a Page. For example, if you have your custom structure as “/%category%/%postname%” (which means, when you’re in a category, you’ll have “/category/cats” in your permalink, when you’re in the “Cats” section), “with_front => true” will have your custom post type set up to show “/category/campaigns” in the URL. But if you have “with_front => false”, then it’ll just be “/campaigns”.

For the record, NEVER use a slash in the slug (i.e you want to give your custom post type a “custom front”). It’ll become a headbanging experience of epic proportions. BIG fat no-no. Take it from me – you don’t even want to try.

Campaign Taxonomies
Creating these are very similar to creating a post type. here, I’ll pop in a bit of code I used for a recent client:

add_action( 'init', 'create_campaign_cats' );
function create_campaign_cats() {
    register_taxonomy('campaign_category', array('campaign_posts'), array(
            'labels' => array(
                'name' => 'Campaign Categories',
                'singular_name' => 'Campaign Category',
                'search_items' => 'Search Campaign Categories',
                'all_items' => 'All Campaign Categories',
                'parent_item' => 'Parent Campaign Category',
                'parent_item_colon' => 'Parent Campaign Category',
                'edit_item' => 'Edit Campaign Category',
                'update_item' => 'Update Campaign Category',
                'add_new_item' => 'Add New Campaign Category',
                'new_item_name' => 'New Campaign Category Name'
            'hierarchical' => true, 
            'show_ui' => true,
            'query_var' => 'campaign-category',
            'has_archive' => true,
            'rewrite' => array('slug' => 'campaign-category'))

The one you need to pay the most attention to are the “hierarchical” (and for the love of all things holy, be sure you spell that word correctly. You have no idea how many times this didn’t work for me because I swapped the “e” and the “i”.) and the first “array” in the “register_taxonomy” line.

“hierarchical” will determine if this taxonomy is like categories (“true”) or tags (“false”).

That first array tells this function what post types to add these custom taxonomies to. For more than one post type, just use a comma-separated value. I.e.:

register_taxonomy('campaign_category', array('campaign_posts', 'post', 'some_other_post_type'),

A TIP: you can actually forego the “add_action” call to register meta boxes and/or taxonomies for a particular custom post type. How so, you ask? In the “register_post-type” call, add in:

'register_meta_box_cb' => 'callback_function_name',
'taxonomies' = > 'callback_function_name'

I know this isn’t as comprehensive a tutorial as I’ve given in the past (as far as creating the themes go), but that’s because the basics still remain the same. There’s new stuff that can be used to make things even more super-powered, which I’ve touched on here. But really, with the new additions, I’ll be posting more specific tutorials on theming (for example, the membership stuff that I’ve been slowly adding in). I don’t know if you all have noticed, either, but I’ve added a new section here called “code snippets” where I’m popping in little juicy tidbits I find myself using quite often – and I think that will also help with some of the more extensive things you can do with WordPress :)

Something totally fun with GeekTool

Okay, I’ve always been fascinated with GeekTool. It’s one of the (many) reasons I’m still happy I converted from PC to Mac several years ago. (By the way, the Mac that I bought back on 2008? Still going strong. If I were on a PC, I would have already reformatted and defragged and cleaned it up – and I’d be doing it to my second replacement by now – and probably getting ready to buy a third one already. I never understood why PC people think Macs are so expensive!)

I had a Geek Tool desktop setup a few years ago, but I made it go away for some reason I can’t recall. But I had to move out of my office over the weekend – it’s so funny how moving just to another room makes you want to clean and organize like crazy! – and when I got my new space situated, I wanted to upgrade to OSX Lion, and then Geek Tool it out.

read more »

Let’s talk about the WordPress Registration Process.

So, the little tidbit (or intro post – whatever you want to call it) in making Membership sites that I posted a little bit ago was apparently a “tantalizer.” People are wanting to know more… more “meat” I guess you could say. It’s funny, so far, this year “membership” sites, or “restricted access” sites are pretty much all I’ve done this year (and the end of last) so I’m getting more and more into it.

read more »

Finally! An Update!

So you may see that things are finally updated around here. Just passing some information: I still have a few bugs to work out. I.e. there’s some old stuff in here that isn’t using the cool new FV Code Highlighter plugin (which I am ADORING so far – makes things so much easier!), and I still haven’t browser-checked this puppy. I cannot imagine what it looks like in Internet Explorer.

So I’ll be knocking out those issues as fast as I can, but I just couldn’t wait to actually put this puppy up. My old site needed a redesign in the worst possible way.

Anyway, just be aware that there still may be a few kinks you’ll run into here and there while I work things out. They’ll be fixed though, I swear it. (and in as little time as possible.) I’ve also got some great content lined up – it’s about time I’ve updated the blog posts here – so there’ll be some posts coming soon with some yummy tutorials for you to dive in to.

WordPress and Memberships

Oh, this was something I was going to save for my redesign. I’m about 98% finished with my website redesign (which is SO BADLY needed – but you know the whole thing about cobbler’s children and all), and this tutorial was going to be one of the first new items I put on the blog. However, I’ve found myself, over the last couple of weeks, hearing the same question asked over and over again (with different words of course – they think they are asking a different question, but they aren’t) and me answering it the same way over and over again.

As to this one point, I do not blame anyone for asking the same question over and over again,because I can understand how they think their situation is different. So hopefully no one thinks I’m a big, fat meanie that’s “venting about complainers” or something – because I’m totally not. I’m just tired of typing the same answer a lot, so I figured I’d put it one spot so I can just link to it and save my fingers from cramping! :)

Okay, so the question is this: “What’s the best plugin for turning WordPress into a membership directory?” (or another variation: “How to do keep [insert some page or file name here] from being accessed by people who shouldn’t have it?” There’s many more variations, but I think you get the idea.)

read more »

wp_logout_url()…. AGH!!!

So I’m working on a site right now that incorporates the new bbPress plugin with WordPress. I’m testing the login/logout process, and since it’s now a plugin (instead of a standalone) you can use your WordPress logging for both things (the site and the forum).

So I’m putting in a link for the logout url, via wp_logout_url(), and I’m following the Codex instructions for the redirect. but as I continue testing, I realize that the redirect isn’t working. Hmm. So off to the forums I trot.

And discover that this isn’t a new issue.

read more »

Back End Instructions – official release

So, you might remember, back in August, I wrote a plugin called “Back End Instructions” and popped it on my site for you all to freely download and use, if you wanted. If you recall, the plugin is for those of you who have a lot of clients that utilize WordPress, and you’ve written a custom theme for them, but no matter how many times you send instructions or answer their questions on how to use it, they still keep asking you.

I’ve discovered that the reason clients do this is because (and no offense to clients – we live in an “instant gratification” age right now) it’s easier to just call you and ask when they forget how to do something than search for the last time they asked you and you provided that answer. You can send them written instructions or answer their questions with meaningful subject lines in email (so it’s easy to find), but they’ll still just call you when they forget instead of looking to see if the question’s already been answered. They want something that’s right there, in their face, and they don’t have to go looking for it.

So I came up with this plugin, and I tell ya, it’s been a lifesaver. read more »

I’m halfway through it, and disappointed

Here it is, June 6th, and I’m roughly halfway through my sabbatical – and quite disappointed in my progress thus far. I have managed to fall back into the old habits that I’ve been trying to change, and I have not yet successfully managed to complete any of the goals I set for myself.

Wow, I didn’t realize how hard it would be to admit that.

I have allowed things to get in my way. One of the things that’s bad about me is my level of focus. It’s not that I have a bad focus when it comes to my work and clients – not that at all. (I have a sincerely disgusting work ethic.) It’s that I always let my needs (and those of my business) to fall by the wayside. I focus too intently on what I’m doing for others, and I don’t focus on myself.

It’s sort of like that thing that they say, about taking care of yourself first? Because if you don’t, you won’t be around to take care of anyone else? Like that. This is the major point about me, and the big one I really wanted to change this year. I love helping other people. I love to solve problems. I will lose sleep for someone else’s issue – and the big downside is that I do take failure personally. I tend to make other people’s problem mine to solve.

Six months into this sabbatical, I haven’t changed this behavior. I’m supposed to be taking time off and focusing on me, and my business – not for selfish reasons, but instead to make me stronger so I can continue helping others – and instead I’m still putting out fires. Like I did last year, and the year before, and the year before. My focus has shifted – yet again- to the needs of others, and placing them before mine.

And I feel so disappointed in myself for it.

I cannot figure out why I see other colleagues of mine, others who are less talented and passionate than I (yes, I do know I’m not a complete loser, and I am self-aware of my own abilities and that I do have some good points to my work aside form my ethic) soar higher than I do. No, I should not focus on how well they are doing – save to congratulate them and wish them well, which I do – and compare myself to them. But their successes are bittersweet, because I know if I’d put half as much focus on myself as they did, then I would shoot right by them and they’d be eating my dust. I’m so happy for them, but I really wish I could do half as well for myself.

As my husband says, wish in one hand…

This is a lot harder than I thought it would be. I know my obstacles, yet I feel like all I can do is stand there and look at them, and help push other people over them, because I feel guilty if I don’t. And what is really upsetting is that more than half the people I help don’t even bother to help me back, or even thank me for the assistance I give. I feel like that lonely girl in the high school halls who will do anything to make the popular kids like her, and even when they abuse her, all she wants is their respect and admiration – so she keeps getting pissed on in hopes one day they will realize her value. It’s kind of pathetic. And sad. (And amazingly, a lot like my high school daughter – wow, what a perspective!)

So that’s where I’m at – six months in. Just as lost as ever. So what do I do about it? Let’s try and turn this into a positive thing. I know what my problem is – and knowing the enemy is halfway to winning the battle against it. What I need is a strategy. I overthink. I look at all the possible actions I can take, and get frozen by which is the right one to choose. So I need to choose. I need to stop wavering, make a choice, and follow that choice unwaveringly. I need to stop deviating from my path, stop worrying about things that are not on this path.

Sounds good, doesn’t it? Yeah, it does. Now I need to see if I can must do it!