Most people who read this post also read: -

______________________________________________________

Set Up a Unique WordPress Page with its Own Custom Header Quickly

*The author's details are shown below the article.

WP1

One day I needed to create an individual webpage with a unique header: I needed something speedily with an non-standard footer, a page template without a sidebar, and a specialised header-banner. I had only 1 WordPress self-hosted blog running at the time, and I didn’t want to go to the trouble of setting up another website by buying a domain and hosting in order to run a single-page-site. Fortunately, because of a number of hacks that I’d already implemented in the current theme (TwentyTen ~ renamed to TwentyTenPlus after I’d customised it.) I was able to set up an individual page with a unique header, individual footer, and page template without a sidebar – IN AN HOUR from first thinking about it – ON AN EXISTING WORDPRESS INSTALLATION – ON A DOMAIN I ALREADY OWNED.

No I’m not trying to sell you some amazing gadget here; in fact, you’ll be pleased to know, I’m not trying to sell you anything… ‘See I’ve already written everything you need to know in this blog. – It’s been here a while. This article is going to link it all together.

As I’ve always said; WordPress is so flexible and uniquely customisable that you can do almost anything with it. Before I go any further let me show you the page I created to prove I’m not spinning you any bull. The page in question is on this very domain, and it’s a fan-page for an up-and-coming singer/star, Becky Hill, who I am a fan of. – Check it out.

So how is it achieved? Let’s proceed as if you owned this blog and domain and wanted to create the exact fan page that I made. This isn’t as hard to achieve as you might imagine: -

  • To start off with you’ll need a page-template without a sidebar.

(If you don’t have one on your blog then create a file called PNS.txt (PNS stands for PageNoSidebar) and copy the contents of the theme file page.php to it. [Remove the php call to get header near the top of the file.- You need do this for this exercise only - otherwise leave it there.] Now remove the line very near the end of the content that reads thus: -

<?php get_sidebar(); ?>

Now rename the file from PNS.txt to PNS.php . Upload PNS.php to your current theme’s folder which you’ll find inside the “Themes” folder inside the folder wp-content on your webspace in the root folder of your WordPress installation. You now have a page template without a sidebar called PNS_Template.)

Some themes have the ability to call any one of a number of multiple headers; others – TwentyTen included – can have only one header file – header.php . I’m going to assume that you’re using TwentyTen as your theme. The methods shown should work universally for all themes.

  • Copy the file header.php to the very top of the content of the file PNS.php and customise it to your liking. You can find instructions for this HERE
  • Replace the php function that calls the footer, so that the template calls a unique customised footer, (See further down) & change the code inside the header-code you copied over so that it calls the unique header-art that you want displayed in place of the site’s usual logo. For instructions see HERE.
  • If you have only 1 footer and you need instructions on how to create and use more than 1 footer; click HERE.
  • Now change the function <?php get_footer(); ?> to code that calls the footer you want to use. You can find instructions for this HERE.
  • Having done so; add content to the page itself and publish using the PNS_Template. – It’s so easy!

OK I’m a bit of a genius who worked out by myself how to do a lot of this; the rest I learned from others… – Seriously it’s not rocket-science though: The tricky bit is creating the header-image; which is a separate article in itself, and only related to WordPress in that the product of the exercise can be used on a WordPress blog. – So maybe more on that another time.

In the meantime here is a list of some other articles I wrote on a similar vein with regard to hacking your WordPress template and making it your own: -

Happy reading. Smile Enjoy.

 

You’re looking at Kkomp.com – Beyond. <--Link to Home page.
The URL of what you see is http://kkomp.com/2012/07/21/set-up-a-unique-wordpress-page-with-its-own-custom-header-quickly/
Why not share the linked URL by pasting it into Facebook or sending it by email?

Post Footer automatically generated by wp-posturl plugin for wordpress.

About the Author - Shazzalive

See http://kkomp.com/about-the-author-etc Also http://kkomp.com/more-about-shazza
This entry was posted in Blog Maintenance, Blogging, Hacks and tagged , , , , . Bookmark the permalink.

 

Most people who read this post also read: -

 

______________________________________________________