WordPress Tip: Function is_user_logged_in

A PHP function is available in WordPress called is_user_logged_in that is very useful if you want to know if a user is logged in.  Why on earth would you want to know this?  Have you ever thought about adding custom content to your blog that only you can see or only logged in (registered users) can see?

If so this function is for you.  I recently updated my blog’s theme and realized that it has some space that could be used for secondary navigation.  nolinks1 The area in red seemed to me like a great place for additional links.

This is where the function is_user_logged_in can help me out.   In this case the area highlighted in red has its own div tag.  It currently looks like this:

<div id=”nav-space”></div>

Inside the div tag I place the following 2 lines.

<?php if (is_user_logged_in()){ ?>
<?php } ?>

The 2 lines call the function is_user logged_in and evaluate the return value with my if statement. The second statement simply closes or ends the if. Do not worry if you do not understand.  Let me just tell you what it does.

Suffice it to say that anything you put between the 2 lines will be seen by logged in users only. For this example I am going to insert a link.

<div id=”nav-space”>
<?php if (is_user_logged_in()){ ?>
<a href=”http://www.google.com”>Google</a>
<?php } ?>

In the example just above a link to Google will be placed in the red area above that can only be seen by a logged in user.  In this case, me!

Now let’s put it in to practice.    I have added 3 links to the red bar section.  I now have access to facebook, friendfeed, and twitter right in my header section. I like this.  I think I will add some additional links later.

Now remember they will only display if you are logged in.  If you are like me you mainly use the same computers and stay logged in.  As long as you are logged in you will see your links.

Do you hang out on your own blog alot?  Would you like to use your own blog for a mini portal? Do you have free navigation space available?

This is great for me and adds functionality for my purposes but leaves the blog crisp and clean for visitors.  Try this WordPress trick in your theme today.

Writing From Shower Thoughts


Do you ever have an idea for a blog post but then it spirals out of control and you end up with more ideas, less ideas, or nowhere at all?

I began this morning with a “shower thought.”  I will define a shower thought as; the half asleep thoughts or fuzzy brainstorming that just seems to flow just after you wake up that sometimes occur while taking a shower.

Your brain and body still half asleep combine to form what seem like good ideas.  Before I knew it I had an idea for a blog post.

Later when trying to write from concept (maybe nothing more than a title) you end up with a post, 3, or nothing writable at all.  Some shower thoughts end up nowhere.

This morning I had a shower thought and had a title for what I thought could be a single blog post.   In this case a rough outline revealed up to 3 possible posts not just 1.

I have heard others say they keep paper and pen with them at all times night or day to record a fleeting idea.  Inspiration may strike like lightening at the strangest times.

When I write based upon a “shower thought” I usually start with a rough outline or notes.  Then I just start writing the post and see how far it goes.  You never know where it will end up.

I do not worry about where I start.  I just write and see where the post takes me.  I do not know if the outcome will be  great or not I just go down the path to find out.

At the end of the road if the result is not post worthy or incomplete then you can always wait for the next shower thought.

Reblog this post [with Zemanta]

5 Ways to Make 2009 The Year Of The Blog

Broadcast your blog

History will decide the fate of 2009.  Happy New Year!  A new year means a new start and new opportunities.  I am looking forward to a great year both personally and professionally.

Take advantage of the new year by updating your blog.  Make a new years resolution to blog more often.

I tried blogging several times but never got the hang of it.  2008 was the year for me after trying 3 or 4 times at blogging.

You can make 2009 the year for you.  Blogging can be time consuming.  If you failed at blogging in 2008 it’s ok because it’s 2009.  After failing at it several times I have realized several things the new blogger should think about.  So here are 5 pointers for the “new blogger” or the “try again blogger.”

  1. Personal Look and Feel. – Your blog is yours and yours alone.  Choose a theme, layout, and look that suits your taste.  Change it as often you like.  Do not listen to anyone telling you what it should look like.  Do not listen to those that preach a consistent look.  That really is not important.  Look and Feel is personal and should be what you want.  I totally recommend WordPress as a blogging platform.  A multitude of themes are available.  I just updated this blog to a theme called WP-Bats that I custom modified to suit me.  Its suits me today.  If one day it doesn’t then I will change.  WordPress is great because most themes do not require modification they just work.
  2. Realistic Goals. Set realistic goals for your blog.  Look most of have full-time jobs, families, activities, and many other things to take our time.  If you want to blog its ok to be realistic.  Set a goal to post once a month.  If it works out then maybe twice a month.  Pace yourself.  The web is not going anywhere and your blog will probably still be there.  If you want an audience just know things take time.  Content is important but just do your best.  It is your blog.
  3. No pressure. – Blog because you want to.  Blog for any reason.  Blog because you feel like it.  Blog when you want to record something or broadcast something.  If you fail at a goal it is ok.  It really does not matter.  Do not read, listen, or hear, the naysayers about how to blog or what to do.  Do not feel pressured that there is a right way to blog.  You blog in your own way.
  4. Fun. First and foremost have fun with it.  You should enjoy what you are writing or posting about.  Your enjoyment means the blog will probably get more attention, more content, and most all more time in your busy schedule.  Second, audiences (readers) generally like to have fun also.  Blogging is about enjoyment through words, pictures, audio, or video and it is a 2 way street.  So if you are having fun the audience probably is too.
  5. No Rules Just You. I believe this more than anything else about blogging.  Forget the rules, forget the blogging formulas, forget the rhetoric pushed out out by the large blogs telling everyone what to do.  You see they are laughing all the way to the bank.  They are making money by telling lots of eyeballs how, when, where, why, and what they should blog about.  Write what you want when you want.

2009 can be the year of the blog.  If at first you don’t succeed try, try again.

Post Worthy

As a blogger do you hold yourself to a posting standard?  The blogs about blogging would certainly say so. 

I have always thought the blogs about blogging amusing.  You know which ones I mean.  The blogs that tell you what, when, and how to write, be successful and oh yeah get rich from your blog. 

Yeah you know which ones I am talking about.  Those sites that discuss how to make money on your blog and give out pointers are some of the only blogs actually making money.

So my theory slash tip slash advice would be for someone that wants to make money on their blog should totally give advice about how to make money on your blog.

But anyway I totally digress.  This post I called “Post Worthy.”

As a blogger do you hold yourself to a posting standard?  Should you?  Is there a quality or threshold for content before it hits your blog?

My answer has and always will be the same.  Whatever makes You happy.  A blog should be about you first and foremost.  I blog when I want, about what I choose, when I can.   

Forget the blogging formulas, and write when and what you want

But, back to post worthy.  Is  it worth it to post drivel? Should you post for the sake of posting? 

Yes and No.  The answers are relative. 

Yeah not sure this post is worthy.

FriendFeed on My Blog

Beijing 2008 Michael Phelps
Beijing 2008 Michael Phelps

It has been a while since I have posted. I have been working on several projects in my spare time. Most of my free time has been spent lately working on a WordPress theme from scratch and watching the Olympics. Michael Phelps is the man!

But, I have still been feed reading and staying up to date via FriendFeed. Jeff of Jeffisageek.net posted a great post about getting friendfeed to your website. In fact he went so far as to add it as the main content on his site.

Today I have added a friendfeed link at the top of the page. I simply wrote a Wordress page template and embedded my FriendFeed content using the instructions from Jeff.

I am working on several new posts so stay tuned. But when my posting is sparse though find out what I am doing by checking my FriendFeed page.

Bloggers Will You Proofread For Links?

ProofRead Errors

I am a horrible speller.  Yes, I said horrible, and I mean horrific.  I am uncertain the reasons why but spell check is my friend.  When I write a blog post I spell check and proofread every time.

As I have said on this blog before quality of content is important to me.  I will post when and what I want but I want to produce some level of quality content.  I have a sense as I write a post that a certain value of content should be reached.

I have established that I strive for a level of excellence but more often than not I fall short.  I always find typographical errors in the form of misspelled words and left out words.

I seem to always leave out words.  Always!  I can read a post 10 times but the moment I have released it to the wild I find a left out word.

I published a post titled “Down with FriendFeed Etiquette.”  I had worked on this post for quite sometime.  I wrote the bulk of the writing last week and had done the research weeks before that.  Despite the effort in crafting a post I still have numerous errors in it.  I found links that do not work, words that were missing, and sentences that simply made no sense.  The spelling was correct in this case.  Well, maybe I did not find any spelling errors.

Trusted Editors

The best candidates for proofreading my blog posts would be trusted individuals.

Friends and family make great although unsuspecting proofreaders and potential editors.  But, in this case I am looking for some expertise in the subject matter of the post.

Friends and Family can do a great job at simple editing.  They can find missing words and assist with general editing.

Proofreaders for Hire

Here is my proposal.  If you are a blogger and would be willing to proofread a blog post I will give you link credit as a proofreader.

Interested?  Sign up as a proofreader and when I get ready to post I will email you several hours in advance.  As a proofreader you promise confidentiality of the post content until released.

Then your job as the proofreader would be to look for spelling, grammar, and general nonsense in the post.  I am looking for the following questions to be answered:

  1. Are there any spelling and grammar issues?
  2. Do the post links work?
  3. Do the sentences make sense?
  4. Can you understand what I am talking about is it clear?

As for style and general sentence structure my style is obviously my style.  I am looking for help proofreading not rewriting or critique.

After proofreading you the reader would email me what you found.  If you were helpful I will include a line at the bottom of the post stating:

Proofread by: Joe of Joe’s Blog, John of John’s Deer, David of TechBlog, & Mary of TechStuff

Each name will be linked to each blogger’s blog.  Would you like to join my proofreading squad?

I will choose arbitrarily a squad of 5 people or so.  If you would like to try leave a comment on this post.