Ever wanted to do something in WordPress but just wasn’t sure how? In my experience this happens quite often, mostly with people new to WordPress. But, even the experts run into trouble sometimes. Today I thought I’d start a series of posts which will aim to explain how to do certain things in WordPress. Hopefully this will cover anything from quick tips and simple little functions, all the way up to more complex custom code and the like. So, stick around and you just might learn something.
I think I’ll kick off the series with a couple simple ones…
Why isn’t this plugin working with my theme?
This is probably one of the most common issues I read about regarding WordPress. Sometimes even more experienced WPers can get this one wrong. Now, I’m not saying this is the solution to all problems between plugins and themes. Its just that this little bugger is often the culprit.
Try ensuring that your theme has
<?php wp_head() ?>somewhere inside the
<head>section of the document. Also, for that matter, make sure it has
<?php wp_footer() ?>somewhere in the foot of the document; Before the
If your theme lacks these function calls many plugins that manipulate your theme will not be able to hook into the required areas. This can cause many headaches.
If you have no idea what I’m talking about, you may be better off having a coder buddy take a look at the theme for you. Or you can also contact the theme author, if the theme you use was created by someone else.
How come my URLs are yucky?
Or, “How come my URLs look like
This one is right up there with the previous question. I see it all the time. However, more and more web hosts these days support the “nice” URLs by default without requiring any extra effort. So, its just a matter of going into the WordPress control panel, changing your Permalink Settings and then saving. Unfortunately, we’re not all this lucky…
The first thing to try would be to contact your web host support and make sure they have whats known as
mod_rewrite(or similar functionality) enabled on your account. If such functionality is not available on your web host, and you really need this feature, you may need to upgrade to a new host that does support it.
If your host does support it and has it enabled on your account, but it still doesn’t work, you can check that WordPress is able to write to the
.htaccessfile (which is where all the “nice” URL magic happens).
For WordPress, on Unix-based systems, the htaccess file should be “
CHMODed” to at least
666. On Windows-based systems the procedure is a bit different. It can be different depending on your particular setup so I won’t go into that.
Basically, as was the case with the previous question, you may need to seek help to figure this out. If you don’t have a code buddy, get one! They are really great to have around. Just make sure you buy them a nice gift for their trouble.
Can I have a link to login to WordPress somewhere in my theme?
Sure! It’s actually easier than you might think…
Some themes have a link for that already. But, there are also some that seem to lack this obvious and simple feature. You can easily add this to any theme yourself. No need for any programming knowledge. Simply add
<?php wp_loginout() ?>somewhere in your theme and you’re done. Easy right?
Another nice function along the same lines is
<?php wp_register() ?>, which will show a link to your registration page (if your settings allow users to register), or a link to the WordPress control panel if you are already logged in.
Do note though that by default the link will be output wrapped inside
<li>tags. This is so you can include the link in a list of other links, like a “meta” section. If, however, that is not how you want it to be output you can use the function like
<?php wp_register('', '') ?>. That will simply output the link and nothing else.
An example of how to customize that is something like
<?php wp_register('<p>', '</p>') ?>, which will output the link wrapped in its own paragraph. Just change the opening and closing tags in the function to make it output how you want. Dead simple!
That’s all for now… I hope it helps!
Do you have a question about WordPress? Want to see it answered here on Weblog Tools Collection? If so, please send us an E-Mail or drop a comment here. Your question just might be featured in the series!