Marketing 101: The Focused Attack

Published on Mar 19, 2009   //  Marketing Tips

As you find yourself tightening up on your company’s budget, you may find that you don’t have as much money to spend on marketing and advertising as you would have liked to have. Even if you’re not tightening up but still find yourself with a relatively small budget to market your company, what is the best approach that you can take?

Some people will tell you that you don’t want to put all your eggs in one basket. They will tell you that you should try out several different strategies to determine which one works the best for your particular demographic and niche. For example, you may spend some of your budget on online advertising, another portion in the local newspaper, and another portion with a few radio spots. This may sound like a good idea, because you are attempting to reach the largest audience possible. However, because of your limited budget, each of these strategies may yield minimal results.

When working with a smaller budget, it may be a better idea to focus on one area at a time, targeting one specific demographic or type of advertising at a time. In this way, your resources (which include your employees and your ability to track the results of the campaign) are better allocated and can be focused on one area. Instead of splitting your attention across several venues, you can zero in one just one. With more money focused on this one area, you may actually yield more impressive results.

For example, you may choose to spend the majority of your budget on a series of ads in the local newspaper. You can have your ad spot run for several days in a row, constantly reminding the readers of the paper of your company and what it has to offer. If you only had the ad run for one day in the paper, the reader may notice and forget. They may hear of your company again on the radio the next day, but they may not connect the two. By seeing the same (or similar) ad in the same paper for several days in succession, this potential customer may be made more aware of your brand and this may have a longer-lasting value.

What’s your take? When you don’t have too much money to spend, is it better to spread it out or to focus on one strategy at a time?

WordPress Development: Options Pages

Published on Mar 18, 2009   //  Development

WordPress Development

While last week we went over how to add an options page to the WordPress Administrative navigation, this week we’ll be going over the actual page itself. We’ll talk about how to update options in the database, and how to mimic the design of WordPress’ default pages.

WordPress includes the ability to manage the processing of your options page’s form. Basically it will sanitize the submitted data and update it in the database. It is fairly easy to setup, and is recommend that you use it (whenever possible) instead of your own.

Making your options page look like the WordPress default is just a matter of using the appropriate markup and CSS classes. The markup consists of a div, header tag, form and table. So, let’s get started.

This markup would go in that function we talked about last week. Since we’ll be outputting a lot of non-PHP code to the browser, I’d recommend ending the PHP block (?>) instead of echoing all this out.

We start by opening a div, adding a header tag and beginning our form:

[code='xml']

Plugin Name

[/code]

Notice that we point the submission of our form to options.php. This is the file that will handle the processing of our options form.

Now, we need to add a line of code that will ensure the user has the proper permissions for editing the options automatically for us. Wrap the following line in <?php ?> tags.

[code='php']wp_nonce_field('update-options');[/code]

Next, we’ll use a table to organize our options.

[code='xml']

[/code]

We will have a row for each of our options. Which will look like this:

[code='xml']

[/code]

Note that the name of the input should be the name of the option you want in the database. We set the value to the value of that option in the database. Don’t forget to update both the name and the value with the name of your option in the database.

After you’ve listed all your options, you can now close the table.

[code='xml']

Option Name

[/code]

Next, we add a hidden field that tells options.php that you want to update these options in the database.

[code='xml']
[/code]

Now, we need another hidden field that contains a list of all the options on this page that should be updated in the database. The option names should be separated with commas.

[code='xml']
[/code]

We can now add a submit button and tie up all the loose markup.

[code='xml']

[/code]

There you have it, an options page that matches WordPress’ style and doesn’t require you to write the processing stuff yourself.

WordPress Wednesday: Revision Control

Published on Mar 18, 2009   //  WordPress
Off

When WordPress 2.6 was released several months ago, one of the innovations that it provided was that of post revisions. It can be a real pain when you delete a large portion of your blog post and then you accidentally save it. In previous iterations, all of that work may have quite easily been lost. With revisions, you can revert back to an older copy of your posts and pages.

This is a very handy feature and can be a real lifesaver, but it can also create quite a burden on your database and it can also make for quite the messy situation. A plugin has been created by Dion Hulse that addresses this very issue.

Going through the settings, you can completely control how the revision process works on your blog. You can limit the number of revisions that are saved for each page or post. You can also delete specific revisions after the fact, thus clearing out some of that superfluous and duplicate data. Alternatively, you can choose to disable revisions altogether or control the number of revisions on a per-post basis.

For more information and screenshots, as well as a link to the download, check out Revision Control in the official WordPress plugin directory.

Community Poll

Published on Mar 18, 2009   //  Polls
Off

Weekly Community Poll

Last week we asked what is your favorite gaming system and 32% said Xbox. This weeks question is…

 

{democracy:73}

Everything PHP: Alternative Syntax for Control Structures

Published on Mar 17, 2009   //  Development

Everything PHP

PHP’s syntax occasionally has multiple ways to achieve the same result. Today we’ll be talking about an alternative syntax for some of the control structures. These alternative syntaxes are there because other programming languages use these syntaxes, and PHP wants to give developers the choice of which to use (as they may already be used to a different format).

Colon Syntax

One of the alternative syntaxes for the if, while, foreach, switch and for control structures is called the colon syntax. This is where you replace the { with a colon and the } with either endif;, endwhile;, endforeach;, endswitch; or endfor; (respectively). Note that when using the colon syntax with if/else/elseif statements, else and elseif have no “end” statement, and the endif; goes after all the else/elseifs. Let’s look at a couple of examples:

if

[code='php']if ($foo == $bar):
return true;
endif;[/code]

if/else/elseif

[code='php']if ($foo == bar):
return true;
elseif ($foo == "bar"):
return true;
else:
return false;
endif;[/code]

for

[code='php']for ($x=0; $x < count($foobar); $x++):
echo $x;
endfor;[/code]

Shortform

This is also a shortform syntax for if, while, for and foreach. This shortform can only be used when you're executing a one-line statement within it. The shortform syntax removes the curly brackets. You should indent the statement one tab for readability purposes (I just can't do that within these code blocks, sorry). Here's a couple of examples:

if

[code='php']if ($foo == $bar)
return true;[/code]

if/else/elseif

[code='php']if ($foo == $bar)
return true;
elseif ($foo == "bar")
return true;
else
return false;[/code]

foreach

[code='php']foreach ($array as $value)
echo $value;[/code]

Conclusion

PHP has multiple syntaxes for certain control structures. It is up to you to decide which syntax you prefer most, or (in the case of the shortform syntax) is easiest to use.

Business 101: Non Revenue-Generating Products

Published on Mar 17, 2009   //  Business Topics

Most businesses have some products in their lineup that do not directly generate any revenue. When you go to a coffee shop, for example, you are given “free” napkins, sugar, cream, stir sticks, disposable paper cups, and so on. When you go to a clothing store, you are offered a “free” shopping bag to tote your purchase back home. These are all valid expenses for their respective businesses, but they do not generate any revenue on their own.

This does not mean, necessarily, that you should try your best to abandon these products altogether. They add to the customer experience and most customers come to expect these so-called “extras” when they visit the related establishments. However, some companies are really starting to cut back on these kinds of items, because they hurt the bottom line without directly helping it.

One of the best examples that I’ve personally experienced recently was at the movie theatre. Although I don’t normally partake, I decided to buy myself some popcorn. The person behind the counter asked if I wanted butter, telling me that it would be an extra charge. Many people would then opt out of the butter, but the person behind the counter never offered the complimentary margarine substitute. The margarine does not generate income on its own, but the butter does.

Further still, I used to expect the ability to douse my bag of popcorn with a variety of flavored shakers. In the past, these were left open for use at the condiment stand, the same place where you’d find straws and napkins. A few years ago, movie theatres removed those shakers, but the flavored powder was still made available from behind the counter in small Dixie cups. They were still complimentary and you could have as many as you wanted. During my most recent visit, there were no shakers at the condiment stand nor where the Dixie cups of flavored powder made available. They were not being directly offered in any way.

After I finished my movie, I noticed a small sign (only next to one of the six available cash registers) that said you could have one complimentary pouch of flavored powder with each bag of popcorn. Additional pouches, which were remarkably small, would come at an extra charge. Not only am I paying an inordinate amount of money for the popcorn itself; you have to insult me with these small extra charges for what should already be made available for free.

Can you imagine going to a fast food restaurant and being charged for the ketchup? These added costs should be factored into the purchase price. It’s all about the customer’s perception of how you run your business.

Page 5 of 12« First...34567...10...Last »