Sometimes creating a page within WordPress can be frustrating because it reformats the post and will sometimes break links or cause things not to display correctly. It can also be difficult to display videos or buttons within a page if you use the rich text editor built into WordPress.

One thing I typically do in these situations is to create a custom page template for certain pages where I need more control over how it displays. One example of this is my advertising page which was created using this method. I wanted to use Paypal buttons for each type of advertisement, and I wasn’t able to do this within the rich text editor that WordPress offers.

So, here is what you need to do. As a quick note, you will need some very basic HTML coding knowledge to write your page by hand, and you will want to make a backup of your theme before attempting this for the first time.

What I did was make a copy of the page.php file within my theme. That is because WordPress uses the page.php file when creating your themes pages. Rename the copy whatever you want, as long as it isn’t already in use (I just went with advertise.php in my situation). Now you will need to name the PHP file. Once that is done, go to the middle of the PHP file you’ve created and delete out the content code, which usually looks something like this:

<?php the_content(__('[Read more]‘));?>

This code might vary a little based upon the theme you are using, so it may not appear exactly like this. Now, you’ll want to paste the text/code you want to use on your custom page. Once you’ve got it how you want it, you’ll want to upload it to your site.

WordPress Page TemplateThe next thing you need to do is to create a new page in your WordPress dashboard like you normally would. Once you’ve created a title, leave the rich text editor blank and go to the Page Template drop-down box in the right menu. Locate the named page you created earlier in the drop-down menu and select it. Now publish your page.

You’re done! Go check your site to see how it looks and make adjustments as needed.

Hopefully I explained this well enough. If you have any questions, please post them below and I’ll do my best to answer them, or will update the post accordingly.

Digg This! | Stumble it! | Add to Del.icio.us | | Print This! |

By default, WordPress displays your php files by whatever the file name is. That means if you name your file wordpress.php, that is how it will show in your WordPress editor. When working with page templates, or if you just want to keep your files a little more organized, you’ll probably want to give your templates names.

Here is all you need to do. Paste the following code at the top of the file:

<?php
/*
Template Name: WordPress PHP
*/
?>

Now change WordPress PHP to be the name you want to use. Easy enough, right?  Tomorrow I’ll be posting a little more about page templates!

Digg This! | Stumble it! | Add to Del.icio.us | | Print This! |

As a follow up to yesterday’s post about WordPress permalink structure (where a good discussion took place in the comments), I decided today that I would dedicate a post to showing you how to switch your blog’s permalink structure without creating any invalid URL’s.

The easiest way to accomplish this is to grab the Permalink Redirect plugin (my plugin review here) and activate it.  Once activated, when you go into the Settings panel you should find a new tab called Permalink Redirect. Scroll down to the bottom of the page and you should see this:

In the old permalink structures box, you can paste your current permalink structure there (depending on which you choose, something like /%year%/%monthnum%/%day%/%postname%/).  If you are unsure what exactly to type, please refer to the permalink page on the WordPress Codex.

Now save and go to the Permalinks tab.   Select the custom field and type /%postname%/, then save.

Now go to an old URL and it should automatically redirect you to the same post’s new URL.   The search engines will see the 301 redirect and update accordingly!

Any questions?  Feel free to comment below!

Digg This! | Stumble it! | Add to Del.icio.us | | Print This! |

One of the great things about using WordPress is the built-in SEO advantages that this software gives you over building static pages or other blogging software. You have an advantage from the start over others not using WordPress! With that said, there are a lot of SEO techniques that need to be set up or applied by the user. The permalink structure is one of these that you can easily set up when creating your blog and then forget about it.

By default, your WordPress Dashboard gives you a 3 choices to choose from. The default permalink structure is a terrible option from an SEO standpoint and the other two aren’t bad, but they aren’t your best option. According to Matt Cutts at WordCamp 2007 (Matt is the lead guy for the Google Search team), the best permalink structure you can use is just the post title with hyphens. According to Matt:

  • Don’t put your blog at the root of your domain.
  • Name your directory “blog” instead of “WordPress”.
  • In URLs, no spaces are worst, underscore are better, dashes or hyphens are best.
  • Use alt tags on images: not only is it good accessibility, it is good SEO.
  • Include keywords naturally in your posts.
  • Make your post dates easy to find.
  • Check your blog on a cell phone and/or iPhone.
  • Use partial-text feeds if you want more page views; use full-text feeds if you want more loyal readers.
  • Blogs should do standard pings.
  • Standardize backlinks (don’t mix and match www with non-www).
  • Use a permanent redirect (301) when moving to a new host.
  • Don’t include the post date in your URL.

For WordPress users, this is easy to set up. Go into your blog’s Options panel and click on the Permalinks tab. You should see the following:

WordPress Permalink Structure

Click the custom radio button and type /%postname%/ into the field. This is the most ideal setup for your WordPress blog.

If you already have an established blog using another structure, you can easily use the Permalink Redirect WordPress plugin to redirect your posts to the new structure.

Digg This! | Stumble it! | Add to Del.icio.us | | Print This! |

WordPress.com is a wonderful and free way for people to begin blogging, but it is only natural for a blogger to eventually “outgrow” it and make the move to a self-hosted WordPress blog. Eventually the draw of being able to monetize your blog, combined with the lure of WordPress themes and WordPress plugins can be to much!

For those making the switch, it can be a period of adjustment as the blogger transitions from having everything done for them to having to do everything themselves. Michael Martine has written a great post walking people through making the move from WordPress.com to WordPress.org. If you are still on WordPress.com, I recommend you click over to check it out!

Digg This! | Stumble it! | Add to Del.icio.us | | Print This! |

Probably the most talked about feature in WordPress 2.5 is the new design for the dashboard that was supposed to be released in WordPress 2.4.  The design has taken a lot of heat since the initial demo was released as many WordPress bloggers don’t seem to like it.   I personally think that it is just drastically different and will just taking some getting used to.  Once people are used to it people will like it.

Once you’ve upgraded, the good news is that you have options.  If you prefer to customize your own colors, Ozh has a nice tutorial up explaining how to make a custom stylesheet in WordPress 2.5.

As previously mentioned, you also have the option of using a plugin such as Fluency Admin to adjust the look of your dashboard (WordPress 2.5+).   I’m sure other plugins will be released as well, giving you a wide variety of looks to choose from.

Digg This! | Stumble it! | Add to Del.icio.us | | Print This! |