Hi David,
I have changed the domain name that is pointing to my price tapestry site. I changed the config.php to show the new domain.
Everything works fine apart from the page titles and the h1 tags which still have the old domain name in them.
Is there a way to update everything to the new domain name without reinstalling the database tables?
I have a lot of categories mapped and other settings and I would prefer not to start again!
Cheers,
Tony
Hi David,
I cannot find the domain name (website title) in the header.php or product.php files.
Looking at this closer I have noticed 2 problems on the product pages:
1. The page titles have the product name and the old domain name title.
2. The h1 tags all have the old domain name title and not the product names.
Here is a page from the site:
http://www.magazineland.co.uk/Classic-Rock.html
Have a look at the source code. This has really confused me!
Cheers,
Tony
Hi Tony,
Is it the text "UK Magazine Subscriptions" that you want to change to the new title?
First, check config.php, as the value:
$config_title = "Your Title Here";
...sets the title that appears as the title when no product or search related title has been set. This is done by the following code in html/header.php:
<title><?php print (isset($header["title"])?$header["title"]:$config_title); ?></title>
As you can see from that code; header.php displays the contents of $header["title"] variable (if one has been set), so the place you need to look for other possible hard-codings are:
search.php
products.php
(these are all in the main directory, NOT /html/)
In all the above files, search for $header["title"] and look for any hard coding of your old domain name title and replace as necessary.
However, I notice that you are running a template from Price Tapestry Templates which is a site run by somebody else; and their templates change the /html/ folder significantly, so without having access to your site I'm not sure which files would need to be changed. If you don't find your old domain name title in the above files (which I don't think are modified by the template), then I would open every file in your /html/ directory and then search and replace as necessary...
If you're still not able to find the code; they do have a support forum where you would be able to get help from Dave (the person who runs Price Tapestry Templates); otherwise if you want to email any files to me to have a look at (perhaps you can zip your /html/ directory and email it to me?) I'll happily take a look for you...
Cheers,
David.
Hi David,
I wasn't sure if this was a price tapestry issue or a price tapestry templates issue. I decided to ask you first.
I just realised that I uploaded the wrong version of my config.php file with my ftp program. Sorry about that. So the issue with the old domain name is now solved by changing my config.php file.
The problem with the h1 tags showing the domain name and the product names as h2 tags, I have managed to solve as well.
In the banner.php I changed this code:
<h2 class="bannerh2"><?php print str_replace("Price search results for ","",$banner["h2"]);
?></h2>
I also changed this code in the header.php
<h1><a href="<?php echo $config_baseHREF; ?>" title="<?php echo $config_title; ?>"><?php echo $config_title;
?></a></h1></div>
Now my page titles and h1 tags show the product names. My website title looks a bit small as a h2 but I can live with that.
Again I am not sure if these are price tapestry or template changes. It seems to work O.K. but if I have done anything disasterous then please advise me!
Cheers,
Tony
Hi Tony,
The size of the h2 will be a template issue, but should be easily changed by looking in default.css and searching for the h2 style, for example (but won't look exactly like this - just search for h2 on its own):
h2 { font-size: large; }
You can then change it as required!
Cheers,
David.
Hi David,
Yes, that worked. Thanks for the advice.
Cheers,
Tony
Hello Tony,
The default config.php doesn't include the domain name at all - the only parameter that is site specific if $config_baseHREF (normally "/" or "/directory/" if installed in a sub-directory); but you may of course have included your domain name in $config_title.
Therefore, i'm not sure how the domain name is being displayed on other (non-homepage) titles, or in the H1 tags, so i'm wondering if these are the result of modifications made to your site by changing the files in the /html/ directory.
Either way; it should only involve changing the HTML to include the new domain name, you would not need to start from scratch at all. The files to look at to start with I would suggest are:
html/header.php
html/product.php
See if either of them contain the domain name, and change it where required and that should be all you need to do...
Cheers,
David.