post-page

How Do You Do That?

4
responses

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 </body> tag.

    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 www.mysite.com?p=123 instead of www​.mysite.​com​/my-​sample-​post/?

    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 .htaccess file (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. :D

  • 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!

heading
4
Responses

 

Comments

  1. Rob (8 comments.) says:

    wp_head…man that one drove me nuts for a while. Glad to see you mentioning it. My main blog, doesn't use it, but I do have it remarked for the day I need it. A common plugin to need it is Greet Box.

  2. Stephane (1 comments.) says:

    This promises to be a great series of posts. I recall a year or so ago before there was facebook connect and twitter plugins and such many people were asking for social media functionality on wordpress. Before that, I recall people wanting magazine-style themes. Now they're everywhere. It does seem that no matter what you want wordpress to do, eventually someone writes a plugin!

    Now if I can just get a plugin to do a hot or not style picture rating page! :)

    • Denzel (7 comments.) says:

      Hi Stephane,

      Maybe you want to check this plugin? http://denzeldesigns.com/portfolio/flex-star-rati

      It's a ratings plugin for user to rate anything.

      Thanks!

      • Stephanie (1 comments.) says:

        Denzel – thanks, but doesn't quite do what I (and others who have requested it) need it to do. The fantasy plugin would allow people to upload their own image, then people would rate it 1 to 10, with each rating automatically advancing the user to the next image.

        Free (and incredibly difficult to install) script here: http://destiney.com/php#Destiney_rated_images as an example. If I could write the plugin I would because I've seen many people in wordpress forums ask about this functionality.



Obviously Powered by WordPress. © 2003-2013

page counter
css.php