The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
How can you change something which occurs on multiple pages of your website without having to go through each one and change the code manually.
For instance, I control all my site's CSS with a single stylesheet which is loaded onto every page, but say i want to change the menu (which appears on each page), how can i change it on each page?
Going through the source code of each page and changing it is very tedious and surely not very professional!
How can you change something which occurs on multiple pages of your website without having to go through each one and change the code manually.
For instance, I control all my site's CSS with a single stylesheet which is loaded onto every page, but say i want to change the menu (which appears on each page), how can i change it on each page?
Going through the source code of each page and changing it is very tedious and surely not very professional!
For example you code up your menu and save it as menu.php then you code up your header (which contains your css link) as header.php.
Then you create a new page and
include("header.php");
include("menu.php");
where ever you want the menu or footer to appear.
You can do the same for a footer of course.
It kind of a php way to replicate frames but means that to update the menu, header or footer across the site you only have to change one of three files each time.
It's how the whole of Freeola works!
Is this how a majority of websites function?
Also, does the php coding get converted back into html coding when the webpage is loaded? For example, if you viewed the source it would display normal html?
> How can you change something which occurs on multiple pages of
> your website without having to go through each one and change the
> code manually...
Another option is to use the FIND/REPLACE tools in your editor.
Whether you use a WYSIWYG editor or a text editor your normally have an option to find and replace text.
Say a phone number needs to be changed on every page of your website - just use the find/replace tool to update the number on every page of your site, all done with one click - then FTP the changed pages.
Search Freeola Chat
> Ok, thanks a lot.
> Is this how a majority of websites function?
>
> Also, does the php coding get converted back into html coding
> when the webpage is loaded? For example, if you viewed the source
> it would display normal html?
Most sites will work this way. If there are elements that feature on lots of pages such as headers, navigations, footers, they're usually a PHP include.
The source will output as HTML. It's not possible to tell whether a site is using a PHP include or not by looking at the source.
I've converted a lot of my pages to .php, but annoyingly many of my google ads have become untargeted, when previously they were targeted. Is this just because google needs to rescan my page, rather than it being because of the php itself?