View unanswered posts | View active topics It is currently 20 Jun 2019 7:26 pm

Post new topic Reply to topic  [ 1 post ] 
website that runs using WordPress is to actually show ..... 
Author Message

Joined: 30 Aug 2011 6:27 pm
Posts: 1
Post website that runs using WordPress is to actually show .....
One of the things that you might have wanted to do if you have a website that runs using WordPress is to actually show different headers on different pages of your website. For example, you might want to show a certain header on your homepage and then a different header on the rest of your website. This header might want to have links to Facebook or Twitter etc.

Doing this is actually relatively easy to do, despite many of the online tutorials saying that it isn’t. So here’s what you do:

The very first thing that you need to do is to actually create a copy of your header file. This means that you need to download the header.php file that is currently being used using an FTP client. After this, rename the file as header2.php or something like that and re-upload it to the server. Make sure it’s the same directory as the location of the original file.
Next, you need to login to WordPress through your admin panel and then click ‘Appearance’ then ‘Editor’. Then, you need to click the file named ‘single.php’ which is one the list on the right hand side of the screen.
After you click this, you should see the HTML content of that particular file and now, you need to location the <?php get_header(); ?> part of the code.
Once you have found this snippet of code in the page, you need to actually replace it with <?php include(TEMPLATEPATH.’/header2.php’); ?>
Once you have done this, you will simply need to save the changes that you have made and then check your site to see if it has worked. If it has worked, you should see the header2 show up on the homepage whereas the original header will show up on the other pages. You can then edit header2 as you wish so that it shows up as you like on the homepage.

It really is that simple and there are a variety of cool things you can do by doing this on your website. We will leave it to you to get creative with the idea now.

30 Aug 2011 6:37 pm
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Party Dresses
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum style by Vjacheslav Trushkin for Free Forums/DivisionCore.