• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Change layout for all pages?

JinYong

New Member
I use the same layout for all pages by using tables. If I want to change something on the main page how do I change it for all of the pages so I don't have to change it for each and everyone.
 
If all the pages are seperate, then there is no way to do that. What I do is use a javascript that I place on all the pages. That way I can easily update the text on all the pages. An example of this would be a copyright. I make a javascript that displays a copyright at the bottom of every page, then when the year changes, all I have to do is edit the javascript and it changes on all the pages. But the way you have your site setup, there is no way to change something once, and have it effect all the pages at the same time.
 
Im not sure if this is what you need but I use BK replace em. This allows me to search inside all html files for a cetain piece of code and lets me replace it with another. i.e. the body color (I know you can use css but this is just an example).
 
Please try to use SSI or PHP include command..
Separate your layout into pieces of files.. and use those command to include the file into one complete page.

The idea for php, if you load 'index.php' it will include the file listed below.

head.php
subhead.php
content-index.php
subfooter.php
footer.php

so now you can change head subhead footer subfooter with what you want without changing all individual file..

Yuo need SSI or PHP to do this.

Another way is to use CSS, but it can't help you on those image stuffs.
 
Couldn't you make a include.js file, do this:

Code:
[i]include.js file:[/i]

document.write("put the stufff that you want to include in here");
document.write("put the stufff that you want to include in here");
document.write("put the stufff that you want to include in here");
document.write("put the stufff that you want to include in here");

**rememeber, you have to put a \ before " and '

and then on your page put:

Code:
[i]On your page:[/i]

<script language="JavaScript" src="include.js">

I think that would work...
 
Never, never, never use JavaScript to include sections of your page, many people surf with JavaScript turned off. Use either SSI or PHP or some other server-side parsing setup.
 
Originally posted by Dusty
Never, never, never use JavaScript to include sections of your page, many people surf with JavaScript turned off. Use either SSI or PHP or some other server-side parsing setup.

I know, I know. But that would work, right?
 
Back
Top