davejonesbkk Posted July 30, 2008 Share Posted July 30, 2008 I have a 468x60 header banner on the homepage of a blog site. I want to change this to a new banner but also I want to set it so that it appears not only on the homepage but also on each individual page within the site. Can anyone help with this? Link to comment https://forums.phpfreaks.com/topic/117286-how-to-make-a-header-banner-appear-on-every-page/ Share on other sites More sharing options...
derekmcd Posted July 30, 2008 Share Posted July 30, 2008 That would depend on how the site has been implemented. How is the site structured? Are you using a Blogging tool? Are there templates? If you use a header include you should be able to place the banner in there. To give you more information you would need to give a bit more informtion on how you get posts and stuff. Link to comment https://forums.phpfreaks.com/topic/117286-how-to-make-a-header-banner-appear-on-every-page/#findComment-603315 Share on other sites More sharing options...
Zeradin Posted July 30, 2008 Share Posted July 30, 2008 you could just make it part of your header and make it a header.php <html> <head> <title><?php echo $page['title']?></title> <img src="your banner" /> </head> and then instead of putting a header on each page just put <?php include('header.php') ?> Link to comment https://forums.phpfreaks.com/topic/117286-how-to-make-a-header-banner-appear-on-every-page/#findComment-603316 Share on other sites More sharing options...
chacha102 Posted July 30, 2008 Share Posted July 30, 2008 Not exactly sure how you are creating the page so: 1) If you simply are adding a image (assuming the banner is an image) to every page, you could replace the banner file via FTP. 2) If you are adding a set of text with CSS rules and such to make a banner, I would suggest changing every page to instead include a header document <?php include("header.inc"); ?> that way, all you have to do is change the header.inc file, and it will change across all of your pages. This is given that you are running PHP on your server, and all of your pages are .php I don't believe there is a function of PHP that allows you to include a file with every page. There possibly could be one on Apache, but I'm not that familiar with Apache. Link to comment https://forums.phpfreaks.com/topic/117286-how-to-make-a-header-banner-appear-on-every-page/#findComment-603318 Share on other sites More sharing options...
davejonesbkk Posted July 30, 2008 Author Share Posted July 30, 2008 Ok thanks for all the tips. Here is some more info: - I am very new to php, to be honest I know nothing about writing php code but I do have a rough idea how it works - The site is using WordPress - I am using ftp to make changes there, I access the WP theme via ftp and then make the changes in the files - In the theme there are files such as header.php, index.php etc (does that help?) This is the site I am ediitng: www.901am.com I want to change that 468x60 header banner so that it appears on every page. Link to comment https://forums.phpfreaks.com/topic/117286-how-to-make-a-header-banner-appear-on-every-page/#findComment-603336 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.