Website Makeover Session

We’ll spend some time looking at what works and does not work on live sites.  You’re invited to submit your own site for review.  We’ll also take a quick look at WordPress and how it makes building and maintaining websites a breeze.

Proper tag for home page conditionals

If you’re trying to use a conditional to display or not display something on your home page, you should be aware that this conditional:

is_home()

only works for the blog posts page.  If you have your home set to a static page, it won’t affect that page.  It will continue to work for whatever page you have set as the blog posts page.  In order to create a conditional that works on any home page, you need to use:

is_front_page ()

This was added in 2.5 and corresponds to the terminology used in Settings -> Reading, where you choose the “front page” of your site – whether it’s your blog posts or a static page.

Read more in the WordPress codex on conditionals.

Advantages of converting your site to WordPress

A lot of people who already have a website want to know if they can keep the look of their site if they convert it to WordPress.  Absolutely.  And here’s a video to show you an example of a site conversion.

Get the Flash Player to see the wordTube Media Player.

Making sense of search engine optimization and web marketing

conversation-marketingWhen I was at WordCamp Seattle this past September, I met a fellow named Ian Lurie.  You need to meet him too, through his blog Conversation Marketing.  Ian makes web marketing and SEO quite sane, and does it with a sense of humour.

Ok, he’s in Seattle so he does it with a sense of humor, but the point is, you’ll learn a lot about how to make your website intelligible to the search engines without some SEO “expert” taking your content and mangling it into something unintelligible to real people (but it’s “keyword rich” don’t you know!).

A great place to start is Ian’s e-book The Fat Free Guide to SEO Copywriting which is packed with simple tips for writing “quality copy that search engines will like.”  Quick example:  I have a bad habit of making “cute” headlines for my blog posts.  I’m trying to be clever and while I hope readers get the connection to the content of the post, search engines won’t (they’re bright, but not as bright as my readers), so I need to be more descriptive and less clever (but if I can have a cleverly descriptive title, all the better).

Once you’ve digested that, you can move on to the main course:  Conversation Marketing – the book.  This is a detailed look at developing your internet marketing strategy – you do have one don’t you?  Either way, this book will help you develop one or make your current one even better.

Learned a lot at Wordcamp Seattle

A big thank you to everyone who made the first Wordcamp Seattle such a success this past Saturday.  The organizers and volunteers made us all feel very welcome and had things nicely set up at the Adobe campus in Fremont – there were so many people involved, but I dealt most directly with Calvin Frietas and Josh Harrison; thanks so much!

ICanHasCheezburger.com was one of the event sponsors and they set up a delicious sponsor/speaker dinner the night before at Pasta Freska (it was an endless parade of a great dishes!).

There were lots of talks going on at once, so I didn’t get to hear that many people live, but I learned so much from the talks I did attend:  Chris Pirillo provided excellent insights into what community is, and why you cannot simply go out and create a community (how many times do we hear that claim in social media business plans?).  Ian Lurie was an excellent makeover artist as he analyzed the pros and cons of three sites submitted by volunteers (and he made SEO concepts clear and sane, which is no mean feat in itself).  Lorelle VanFossen brought her unique brand of WordPress evangelism (I think it’s still a good word to use, Lorelle) to the issue of creating lots of good content quickly (and using bold text judiciously).  Mark Jaquith brought us up to date on the exciting social media plugin suite Buddy Press as well as the notion of canonical plugins for the future (I’ll blog more about this idea of team-developed and supported plugins soon).

There was an Ignite session, which I’d never had a chance to see before.  As someone who’s interested in presentation skills, it’s awesome (in the true sense of the word) to watch people give a five minute presentation with 20 slides that automatically change every 15 seconds…  I was amazed how much they could jam into that time frame, and how well they did keeping their timing with the relentless slide changes.

Liz Strauss made an excellent point in her closing talk that really struck home as I live-blogged and tweeted for my wife and her colleagues (TheBookBroads.com) the next day at a literary festival in Vancouver BC:  we need to stop distinguishing between the online world and the real world when it comes to the concept of community and social interaction – the one is no less real than the other.

And of course the most important aspect of a Wordcamp is meeting all the other people out there who are interested in WordPress.  Speaking of online and offline realities, I’m so used to living in the online WordPress community, that it’s a joy to spend time “in the real world” talking with the members of that community.  A great time was had by all!

Automated update to 2.8.4 stalled

I had a blog with WordPress 2.8.1 and used the built-in automated update to go to 2.8.4.  Suddenly the process stopped at the point where it says “Installing the latest version.”  I left it for a half hour, but when I came back it was still stalled.

I tried clicking on the dashboard and saw this message:

try-auto-2-8-4-update-again-message

When I clicked on the link to try it again, the update happened quickly and fully without any problems.

This was the first 2.8.4 update that hasn’t gone smoothly for me (I’ve done over a dozen from 2.7.1, 2.8.1, and 2.8.2 without any glitches).  Some other people haven’t been so lucky – see the update tag on the WordPress forums.

Common answer on the forums is:

3. Try adding this line to your wp-config.php file:
Increasing memory allocated to PHP
define('WP_MEMORY_LIMIT', '64M');

[from this forum thread]

Using search engine friendly headings in your text

When you have a large amount of text in a post, it’s important to break it up with sub-headings, and you’ll find those in the format or paragraph drop down menu on your Visual text editor  (technically, it’s the format menu, but most of the time you see it displaying the paragraph setting because that’s the default in the text editor).

IMPORTANT:  Do not use Heading 1 or Heading 2

The headings in the text editor’s drop down menu use a set of HTML tags, which not only have specific styling in your theme’s style sheet, but more importantly have special meaning to search engines.  Heading 1 uses a tag that essentially says “I’m the title of this HTML page,” while Heading 2 uses a tag which essentially says “I’m the title of this post.”

If you use either heading for the subheading of a post, you’ll confuse the search engines (and visually you’ll confuse your readers too).

For subheadings, stick to Heading 3 or lower.

Listing a parent page and its children

I wanted to have a set of pages – a parent and sub-pages or child pages – that I could use as a separate menu down on the footer (for privacy, disclaimers, etc.).  The issue was, how to code WordPress to display them as a single list of pages.

First I tried this:

<ul>
<?php wp_list_pages('title_li=&include=416&depth=2'); ?>
</ul>

thinking that the “depth” parameter would pick up the children of 416.  But that didn’t work, and the only thing I could find that does work is:

<ul>
<?php wp_list_pages('title_li=&include=416'); ?>
<?php wp_list_pages('title_li=&child_of=416'); ?>
</ul>

Anybody  have a better solution?

Changing placement of a meta box on admin pages

I recently added a plugin, and the meta box on post and page screens appeared before the excerpt meta box.  The client was going to have multiple contributors and we didn’t want them to see this plug-in first (it had a very large meta box) and potentially forget that there was an excerpt box and custom fields further down.

How to move the meta box? It all hinges on a function called

add_meta_box

which takes a parameter called $priority – either ‘high’ or ‘low.’

I simply went into the plugin’s file and found this:

add_meta_box($this->prefix, $this->plugin_name, array(&$this, 'meta_box'), 'post', 'normal', 'high');
add_meta_box($this->prefix, $this->plugin_name, array($this, 'meta_box'), 'page', 'normal', 'high');

and switched it to this:

add_meta_box($this->prefix, $this->plugin_name, array(&$this, 'meta_box'), 'post', 'normal', 'low');
add_meta_box($this->prefix, $this->plugin_name, array($this, 'meta_box'), 'page', 'normal', 'low');

For more information on this function, read the WordPress codex page on add_meta_box.

I haven’t found out if there’s any other more precise way to place meta boxes within a column – the $context parameter lets you choose the column.  I know that users can move boxes around, but most of the time they don’t, so it’s important to be able to control the default order of boxes.

Plugin to help manage your page menus

It can be a nuisance to manage your menus for WordPress pages when you need to include or exclude certain pages.  It can be done by editing the wp_list_pages() tag, but that means going into the template code.

For the day to day user of WordPress, there’s a handy plugin that allows you to do this and a lot more on a page by page basis.  It’s called Page Lists Plus by Tim Holt.  Tim’s got a whole range of global options you can apply to any page list: (more…)

Proper syntax for including a sub-page in a series of included pages

Suppose you already have a specified set of pages you’re displaying in a menu.  You’ve used the include parameter in your tag, so it looks like this:

<?php wp_list_pages('title_li=&depth=1&include=69,181,95,73'); ?>

You want to add a sub-page to this list of included pages, but when you do that, it doesn’t show.  You might think it’s because you have the “depth=1″ parameter, so you change it to a depth of 2 and the code looks like this:

<?php wp_list_pages('title_li=&depth=2&include=69,181,95,73,204'); ?>

Still the sub-page with id 204 won’t show up.

The reason is that you need to get rid of the depth parameter completely, so it looks like this:

<?php wp_list_pages('title_li=&include=69,181,95,73,204'); ?>

Deleting the default admin user

Quite some time ago I thought about changing the username of the default admin account on WordPress, but you can’t change a username once it’s set.  I thought the same thing applied to the admin account itself (just as WordPress has a default category that you cannot delete).

Turns out you can easily get rid of that admin account (thanks to John Bollwitt for pointing this out to me):

  • Create a new user with administrative rights
  • Log out of WordPress as “admin”
  • Log in as the new administrator
  • Now you can delete the original admin account (WordPress gives you the option of deleting all the user’s posts or transferring them to another user)

I also read this great tip in an article from Smashing Magazine on how to protect your admin area in WordPress: don’t allow your username (even the new and improved one you create for the new admin account) to show in your posts and pages.  Make sure you switch the Display Name As function in your profile so that it shows your name, and not your username – why let hackers know what your administrative user name is?

Catching up on comments

My apologies to everyone who’s been submitting comments and suggestions over the last few months.  I’ve been so busy writing a book about WordPress that I’ve not had time to update SeeHowTwo.  As the book approaches completion, I’m slowly getting back to a normal routine.

Over the next few weeks, I’ll try to get to the backlog and update videos as well.  Thanks for your patience.

Miss604 blogs about WordCamp Fraser Valley 2009

Ok, I was at WordCamp Fraser Valley – we were all in the same room – and I swear I never even knew that Rebecca Bollwitt (aka Miss604) was doing video podcasts and twitter updates about the event, not ten feet away from me!

If you want to see effective blogging and use of social media, follow Rebecca’s blog and tweets.

Let’s be honest – this is a site about WordPress

Some big changes here at SeeHowTwo.  I started with the overly ambitious plan of having video tutorials on all kinds of computing questions.  Once I got started on WordPress, however, I found I had plenty to do, so as of now, this is a site about WordPress alone.  It may expand in the future, but for the moment, this is enough on my plate!

Also, it was time I had a place to blog about WordPress, so that’s what you’re reading now.  I did, after all, build this site in WordPress and setting up a blogging area was only a few template tweaks away…

My first WordCamp – thanks Fraser Valley!

This post is a bit late, mainly because I had no blog in which to post it… So, now that I do, I want to say thanks to Gary Jones of Blue Fur for organizing, and all the speakers and participants for attending, WordCamp Fraser Valley 2009.  I had never attended a WordCamp and now I know why they’re so great.

It was quite therapeutic to be able to talk WordPress for an entire day and no one thinks you’re nuts!  It was, after all, one of the last Saturdays of a gorgeous British Columbia summer, and here we were sitting around talking about plugins and database queries and whether Visual editing is better than HTML editing.  I wouldn’t have been anywhere else.

I’ll be posting about some of my favourite topics from the day – now that I have a blog – but I just wanted to say thanks to everyone!

Growing up with child themes

The topic of my talk at WordCamp Fraser Valley 2009 was Growing Up With Child Themes.  Briefly, a child theme is one that uses the style sheet and template files of another theme – the parent – and can override them.  The basic idea is that instead of modifying the parent files, you simply drop new versions of the files into the child theme folder. (more…)

Using Shortcode outside of the_content()

I had some shortcode that couldn’t be used in the body of certain posts. It needed to be inserted in a template, but of course that prevented it from being rendered by WordPress because it was no longer being parsed within the_content().  Finally discovered the answer was simple:

<?php echo do_shortcode('[mappress]'); ?>

What’s New

singhosts-smallJust heard that SingHosts – a blog hosting company in Singapore – is using SeeHowTwo’s WordPress videos to help their customers.  Thanks for the links – enjoy!

If your hosting company is making use of the videos, I’d love to hear about it.

——————————

We’ve added an embed feature on all videos.
(Thanks to Jeff over at WP Tavern for getting me off my programming butt :-) )

Now you can put any of our videos on your blog or website. Here’s how:


Mouse over any video and up at the top left hand a small arrow will appear.

Click on that arrow and it will expand to show you the embed code and also a link code.

Copy and paste that code into your blog post or website page and your visitors can See How Two too.

(Implemented using the Viral plugin for the JWPlayer, which is used by the wordTube plugin)

Schedule a post to publish at a future date and time

When you write a post in WordPress you don’t need to publish it right away.  Here’s how to schedule the publication date and time anytime in the future.

Get the Flash Player to see the wordTube Media Player.

All trademarks and copyrights appearing on this website are the property of their respective owners. All rights Reserved.