How to Build Content for a New Blog

Building content for a new blog can be extremely formulaic.  I find it’s actually easiest to get the first ten to fifteen articles built before writing starts to get more challenging.  That’s because after you write the first set of articles, you need to start getting creative.  I’m going to give you a blueprint for building those initial articles and we’ll cover on-going content in a later post.

Creating the Initial Content

This really depends a lot on your niche, but I’ll try to give you the building blocks for building that initial push towards bringing your blog online.  The core step to launching your blog is building the initial content.  I say ‘building’ instead of writing, because this is extremely formulaic in nature.  The goal is to create ten articles to cover your first month of content release, so you don’t want to throw all of your knowledge into one article.  Always hold back a little bit of information to give them later.  That will keep them coming back AND give you material for later.  Also make sure your posts are not more than 700 words.  People tend to get bored if they’re much longer than that.  If you have a post that is over that, consider breaking it into multiple postings.

Continue reading

Series: 7 Weeks to a Successful Blog: Week 1

I’m starting a new blog series called 52 Weeks to Success.  It’s going to be about starting a blog and building it up, start to success (notice I didn’t say finish).  It will make decent money online and detail every part of the process from conception to execution to making money.  Without further adieu:

Commitment

Time: 7-10 Hours; Cost: $11

Research a Niche

I’ve been losing weight for about 3 months now and I’m down about 25 pounds.  I’d like to lose about 30 more, so I’m going to focus on health and fitness as my niche I think.  Notice I said I think, because I haven’t done any research yet.  I’m not a fitness expert, nor am I particularly fit.  I do know from hearsay that gaming, fitness, dating, and finance are great niches to work in, but they’re extremely competitive.

Since I know I want to do something in Fitness, I’m going to pull up GoDaddy.com and Google External Keyword Tool.  I’ll start with the keyword tool and check for phrases that are in my niche.  I like phrases have a lot of words and a lot of searches.  3 words and over 5,000 searches usually means it should be easy to reach number one.  On GoDaddy, I’ll try domains that match the keywords that show up in the External Keyword Tool. It’s absolutely important that you know what keywords you want to rank for, because if you don’t you might be wandering a bit.  This allows you to focus.  I found that this is ultimately what lead to my success in building websites.

After an hour or so of playing with variations on diet, health, fitness, exercise, and blog, I ultimately chose “core fitness blog” as my keyword of choice.  It has 27,000 searches and is extremely competitive, but I’m ambitious.  This may blow up in my face later, but we’ll see what happens.

Get a Domain Name and Set Up Hosting

Now that I’ve selected a niche and some keywords, I need to buy a domain.  I just happened to find the perfect one that includes both of my keywords and another fairly relevant keyword.  I registered the domain and proceeded to set up my hosting.

If you have questions about how to set up a domain or hosting, just shoot me an email or leave a comment.  I can help you with that.

Install WordPress on the website and stick with the generic template.  Design doesn’t matter right now.  What you need is content.

Start Writing Content

Write 10 articles, spending about 30 minutes each on the articles.  Don’t go straight from one article to the other either.  Take 5 minutes or a day in between to take a break.  Have some food, surf the net, work, sleep, play Tetris, or do something else that gets your mind off of writing.  If you don’t do that, you’ll burn out.  Remember: this is supposed to take about a week.  Once all of your articles are written, go back and read them all out loud.  I don’t care if it’s awkward.  Also: if you can have someone else read them – do that too.

Once you have all of your articles written, load them into WordPress and date all of them 15 or so days apart going back in time.  If you need help doing that, just let me know.  The reason you do this is to give your blog some long term relevancy right now.  People tend to trust a blog that has been around for a while and has multiple posts.

Get the Word Out

Any time you’re not working on the things mentioned above, you need to be discussing your niche with like minded people.  I’ll be detailing specific effective ways to get the word out in later posts, but in general, just get a conversation going.  Use social media like forums and other blogs to drive peoples’ interest in your direction.  You could easily spend 40 hours a week on this specific part of development.

Concluding Week 1

You should have more than enough work with these tasks.  Always remember that if you have extra time, you can move on to next week if it’s out already, or you can fill your time with spreading the word.  Everything listed in this post should take about 7-10 hours (less getting the word out) to do and cost $11.  You can use this method to build 4 blogs simultaneously as your full time job, or one blog after work.  Tell me how your first week went in the comments below.

Blogging Tip: Picking a Niche in Narrative

Bob: What should I blog about?  I want to make money off of my advice.

Fred: I don’t know, but what do you like?

Bob: I like playing golf.

Fred: Are you any good?

Bob: No.  I just started about 3 months ago.  My handicap is 38.

Fred: You shouldn’t blog about golf advice. Are you good at anything?

Bob: I’m a wizard at Excel.

Fred: Do you like it?

Bob: Kind of, but only when I have a challenging problem.

Fred: Why not do a blog about challenging excel problems?  You could also start a blog – more like a journal of learning to golf better.  I suspect the Excel blog will attract more people.

Bob: Two different blogs?

Fred: Yeah, I think that’s a great idea.  The point is: don’t do what you love, do what you like and are knowledgable about.  People out there are looking for GOOD information, so make sure you give it to them.

Bob: How do I make money off of it?

Fred: Wait until a few hundred people actually care about you and then come see me.

Bob: How will I know they care?

Fred: You’ll know.

Paginating in MSSQL

I don’t really work with MSSQL very much and was wondering how to do pagination similar to doing it in MySQL with the LIMIT command.  It’s MUCH harder in MSSQL, but here is how you do it:

SELECT * FROM
 (SELECT TOP [size_of_record_set] * FROM
 (SELECT TOP [end_record] * FROM [table] ORDER BY [field] ASC) AS tbl1 ORDER BY [field] DESC
 ) AS tbl2

Scheduling Posts in WordPress 2.9.x

The easiest way to release content on your blog is to write it all at once and slow release it over time.  This also works really well when you’re on vacation or otherwise indisposed.

  1. Write your post like you normally would, but hitting the “New Post” button in the top right corner of your dashboard.
  2. Look on the right side of your post window and you should see some publish options.  Click “Edit” where it says Publish immediately.
  3. The window should expand and look something like the image to the right.
  4. Set your date and hit “OK” and it will release in the future.

If you use this on all of your posts, you can dedicate specific large amounts of time to setting up your posts for the week or month.  This way you can have periods of inactivity on your blog and still be releasing content.

The Twitter API

I’ve been messing with the Twitter API for the first time in the last few hours, and I’ve learned a TON.  I know – I’m jumping on the bandwagon late, but oh well.  I managed to create a script to retweet “stuff” based on the search functionality and I made a script to automatically follow people that post specific things.  I also managed to get my account suspended in like 2 hours due to suspicious activity – whoops.  I guess you live, you learn.  Basically everything for status updates and following uses CURL, which looks a little something like this:

<?php
 $username = "<username>";
 $password = "<password>"; t t
 $message = "<message content>";
 $url = '<API URL>';
 $curl_handle = curl_init();
 curl_setopt($curl_handle, CURLOPT_URL, "$url");
 curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
 curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt($curl_handle, CURLOPT_POST, 1);
 curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$message");
 curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password");
 $buffer = curl_exec($curl_handle);
 curl_close($curl_handle);
?>

If you’re looking for more info on how to use twitter, check out this eSeries.  It’s a good resource.

So, have questions?  Let me know.  I’m hoping to do a twitter series soon!

Tidbit Tuesday on PHP: Simple MySQL Database Insert Function

This builds on a function I did last week: db_query(). You can send any array straight to a MySQL database and it’ll even check to make sure the column actually exists.  Oh, and it returns the id of the record you just added in case you needed it.

<?php
   function db_array_insert($cfg_array, $table, $array) {
      require_once("dbQuery.function");

      $sql = "show columns from ".$table
      $tableArray = db_query($cfg_array, $sql);
      $inputString = "";

      foreach($tableArray as $key => $value) {
         if (array_key_exists($value[0], $array) && $value[0])
            $inputString .= "'".addslashes($array[$value[0]])."', ";
         else
            $inputString .= "'', ";
      }

      $inputString = substr($inputString, 0, -2);
      $sql = "insert into $table values(".$inputString.")"
      db_query($cfg_array, $sql);

      return mysql_insert_id();
   }

   $insert_array = array(
      "column_1" => "something_1",
      "column_2" => "something_2"
   );

   $cfg_array = array(
      "db_loc" => 'www.databaselocation.com',
      "db_user" => 'some user'
      "db_pass" => 'some password'
      "db_name" => 'database_name_here'
   );

   db_array_insert($cfg_array, "some_table", $insert_array); //and use it.
?>

So what do you think?  Having a problem?  Just let me know in the comments.

Tidbit Tuesday on PHP: Simple MySQL Database Query Function

It’s always great to create functions for those things you do a lot.  Probably the single most common function I execute is database calls.

Here is a simple script for hitting up your MySQL database with a query:

<?php
   if(!function_exists(dbQuery)) {
      function db_query($cfg_array, $query) {
         $connection =
            mysql_connect(
               $cfg_array['db_loc'],$cfg_array['db_user'],$cfg_array['db_pass']
            ) or die(mysql_error());

         mysql_select_db($cfg_array['db_name'],$connection)
            or die(mysql_error()." >> ".$query);
         $result = mysql_query($query,$connection)
            or die (mysql_error()." >> ".$query);
         $i = 0;

         if($result != 1) {
            while ($data_array = mysql_fetch_array($result)) {
               foreach($data_array as $key => $value) {
                  $tableArray[$i][$key] = stripslashes($data_array[$key]);
               }

               $i++;
            }

            return $tableArray;
         }
      }
   }
?>

You should be able to just copy and paste this as a function and call it in one of two ways:

$cfg_array = array(
   "db_loc" => 'www.databaselocation.com',
   "db_user" => 'some user'
   "db_pass" => 'some password'
   "db_name" => 'database_name_here'
);

$query = "SELECT * FROM 'table' WHERE some_column = 'something'";

db_query($cfg_array, $query); // This will return an array with the table in it.

$query = "UPDATE/DELETE/ETC * FROM 'table' WHERE some_column = 'something'";

db_query($cfg_array, $query); // This will return return an empty array, but still works.

I use this function in EVERYTHING.  I also have some other functions that use this as its base.  Someday I’ll turn it into a class.

So, what do you think?

Tidbit Tuesday on PHP: Holiday Notices for Business Sites

This is a handy script for managing an out of office message on your website.  I find this very useful on business websites when you’re tired of making that one little change to let people know when the office will be shut down.  With about 15 minutes of extra work, you only need to do it once a year.

Let’s say for instance we’re doing all of the major U.S. Holidays in 2010, observing weekend Holidays with a day off on either side of the weekend.  This means first we need to determine what those dates are.  I just happen to have looked up the six most common, listed below:

  • New Year’s Eve – January 1st
  • Memorial Day – May 31st
  • Independence Day – July 5th (July 4th is Sunday)
  • Labor Day – September 6th
  • Thanksgiving – November 25th and 26th
  • Christmas – December 24th (December 25th is a Saturday)

Now that we know our dates, we can build them into an array:

$date_array = array(
   "New Yearís Eve" =>
      array("leaving" => "2010-12-31", "returning" => "2011-01-03"),
   "Memorial Day" =>
      array("leaving" => "2010-05-31", "returning" => "2010-06-01"),
   "Independence Day" => // July 4th is a Sunday
      array("leaving" => "2010-07-05", "returning" => "2010-07-06"),
   "Labor Day" =>
      array("leaving" => "2010-09-06", "returning" => "2010-09-07"),
   "Thanksgiving" =>
      array("leaving" => "2010-11-025", "returning" => "2010-11-029"),
   "Christmas" => // December 25th is a Saturday
      array("leaving" => "2010-12-24", "returning" => "2010-12-27"),
 );

The date array can easily be stored in a database or be made up of more complicated functions that would calculate the holidays across multiple years with some basic logic.  Maybe we’ll cover the latter part in another post some day.

Now we need to build the function itself.  This function will be run every time the page loads.  You can even include the function in a separate file to be included on multiple pages:

function holiday_message($date, $date_array) {
   $date = strtotime($date); // Reformat the date so we can do math on it.
   foreach($date_array as $key => $value) {
      $leaving = strtotime($value['leaving']);
      $returning = strtotime($value['returning']);
      $early_warning = $leaving - 86400 * 7;
      // If the date is between (7 days before) leaving and returning
         if($date > $early_warning && $date < $returning) {
            echo
               "We will be observing ".$key." from ".date("Y-m-d", $leaving).
               " until ". date("Y-m-d", $returning).".
               When we return we will be more than happy to assist you.";
         }
   }
}

Now we just need to execute this function anywhere on the page:

holiday_message(date("Y-m-d H:i:s"),$date_array);

This code can be customized in numerous different ways, so the the message is more formal, or works for your specific situation.  You can also change the way days are stored or calculated, like the example above.  This is a core to get you started.  Where can you go from here?