Entries Tagged as 'Tips and tricks'

Using conditional tags with Wordpress

This is something I had been trying to wok out how to do for a while. It’s particularly useful for implementing links only on certain pages or for keeping stuff on your home page but off of the rest of your blog, or vice versa.

Conditional tags are a way of having bits of your blog show up only in certain places. The task I had yesterday was to implement some RSS code on only certain pages of a website. I needed to keep the code kept off of the front page and only under a certain category, let’s say “category A”, for example.

It was so easy to implement that I’m actually a little embarrassed that I didn’t learn this basic code earlier. Bear in mind that this code will only work when implemented in your template files and not in actual blog posts.

There are a range of conditional tags that you can use, all of which can be found on the Wordpress website. Here’s the one I needed:

<?php if(is_category(’category A’) ) { ?>

Code went here

<?php } ?>

Let’s say you want something to appear only on your home page. The code would then look like this with conditional tags:

<?php if(is_home() ) { ?>

Code goes here

<?php } ?>

It’s that simple. Conditional tags can come in handy for cleaning up your blog’s template. The possibilities are endless. If you want to use multiple conditional tags, you can do so as follows:

<?php if(is_category(’category A’) || is_single()) { ?>

Code here again

<?php } ?>

This would have the code show up only in category A and on single blog posts. Easy!

What being back in Bangkok taught me about blogging

I was in Bangkok all weekend and was reminded of how much that city thrives on image. It’s really the same as the blogging world. Image is everything. In Bangkok, there are two types of people: there are those who have got it and there are those who act like they’ve got it. It’s not even about money – it’s about the image of wealth. If you’re a blogger who isn’t making stacks of cash yet, there is something to be learned from those Bangkokians who act like they’ve got it.

In Bangkok, it’s incredibly easy to present yourself as if you are a member of the high society, the elite. Fake designer labels can be picked up dirt cheap; there are numerous social gatherings with loose security you can show your face at; and people spend all of their money on expensive cars, phones and other such status symbols.

Even if they can barely afford to feed themselves, people in Bangkok spend obscene amounts of money on items that people will see and associate with wealth. It’s a fickle world, but when you think about it, as bloggers, we can do the same thing.

Instead of phones and cars, bloggers flaunt blog posts to show off their success. Just as wealth is perceived as good in Bangkok, so success is perceived as good in the blogosphere. This success usually comes down to how much money a blogger makes, but it can also be attributed to readers, RSS subscribers or just the ability to share useful information.

Image is everything

If you can pull it off like those people in Bangkok, convincing the online world that you are a success, then you give people a reason to read your blog. When I see a hot girl all wrapped up in designer threads with expensive-looking jewelry, I don’t think to question her status because she has an image. It’s the same with bloggers. Unless their claims are ludicrous, you don’t think to question their success.

You can often get away with presenting yourself in a favorable light because the vast majority of readers will not be keen on doing detective work to uncover the truth behind your image. The problem comes when you get so wrapped up in creating your image that you lose sight of what you’re doing. It’s like the people in Bangkok who spend their whole lives faking it: they stop putting time into actually making it.

Make the myth a reality

Sure, I could sit here every day and tell you I make $5,000 a month. I could convince you I’m an Internet guru, and if people started believing me then that would be half the job done. But to get the other half done – to actually make $5,000 a month – that’s the real challenge. What good does it do you to convince the world you’re rich if you don’t even have enough money to pay for your hosting?

I love Bangkok, but sometimes the fakeness of the city bores me. Being back in the big city, however, reminded me how easy it is to be held in high esteem by faking it. If your blog sucks and you have no readers, you don’t have to tell everyone that. Tell your readers you are the best, that they should read your blog – believe what you write and make it come true. Nobody wants to read a blogger who doesn’t believe in himself.

Making your blog timeless keeps your posts fresh

For the bloggers out there like me who have quite busy lives, blogging every day can be almost impossible. As an example, at the moment, the island I live on in Thailand (Phuket) is celebrating a 10-day vegetarian festival. I’ve been attending the festival early in the morning and late at night, before and after work, almost every day recently because it’s like nothing I have ever seen before. To give you an example, here’s one of my photos from the festival.

Phuket Vegetarian Festival

What you can see there is a group of men hitting themselves with axes and swords. This past week, I’ve seen men and women slice their own tongues with axes, pierce their cheeks with swords, blades and all manner of objects, bathe in hot oil, run across fire, and climb ladders with bladed rungs. These brutal, self-torturous acts are said to bring luck on the community. I have some horrifically-graphic images I could post, but then I run the risk of losing all my squeamish readers.

This festival has been taking up all of my time, and therefore my blogging schedule has been sporadic. I made the decision then to remove the date from all of my blog posts. I did this because when I visit a blog, if I see there is a gap in between posting, it makes me wonder why. Also, if I see a gap on one of my regular reads, it makes me question the blogger, even though I know that such gaps are inevitable.

Removing the date from all posts means that when a new reader arrives at my blog, the latest post is always “new”. It also makes gaps between posting more difficult to spot. Ideally, I try and blog every day, but this isn’t always possible. Removing the date was as simple as going into the “index” and “single” files of my theme and editing the code.

Now every post reads, “Posted by Angel” with no reference to when my post was written. A lot of bloggers use this technique if they can’t post every day. Let’s face it, what does it matter when a post was written if it contains good content? Not all readers will see that logic though. Readers can be demanding. They want daily posts and they want regularly updated blogs.

Have you ever considered making your blog timeless?