Open up /includes/languages/english/index.php and find:
[php]define(‘HEADING_TITLE’, ‘Let\’s See What We Have Here’);[/php]
Save and upload. Done.
There is a slight problem once you’ve done this, but I’ll cover that in a future post – inthe meantime I wonder if any of you can work out what the problem is? The first person to spot the problem and present a solution will win a prize…
Answer to Problem:
[php]$category_name = (isset($HTTP_GET_VARS[‘manufacturers_id’])) ? $manufacturers[‘manufacturers_name’] : $categories[‘categories_name’];
manufacturers are now called as appropriate.
Have no idea what the problem is. Love this idea tho.
Only thing I can really see and it most likely is meant to be that way is that until you get to the sub-Categories (if using) Is you get the word Categories there. Would be even cooler if say the Main Category name was there instead.
That line of code wouldn’t be terribly helpful on the main index page anyway. No categories have been selected.
Cassie – in that case, just also change this line 😉
Jared – good try, but it should work OK without the ‘ escapes.
I believe it’s the problem is that the language file is called before the $categories query is run.
Forgive the bad grammer in the previous post. Just starting the day off a long night. 🙂
John – that shouldn’t affect it.
The problem is the “manufacturers” name – it simply will not show as we are only asking the script to show the category name.
Most shops probably would never notice it – but if your shop does use Manufacturers, and you made this modification, then you need a bit of extra code to deal with it.
Anyone come up with the extra bit of code?
You are a legend Gary 🙂
Thanks for that tip.
5f you are changing this for SEO you should also add
BCS – I’m guessing you added code which wordpress managed to eat. If you send it me via email I’ll add it to your comment.
Oh – no-one took up the challenge, so here you are:
$category_name = (isset($HTTP_GET_VARS[‘manufacturers_id’])) ? $manufacturers[‘manufacturers_name’] : $categories[‘categories_name’];
This will show the manufacturers name instead of the category nam when in the manufacturer structure of index.php
I guess it did eat it. It was the EXACT code you added but mine got eaten … 😉 So where is my prize???
Okay, all I put was that you needed the H1 tags around the code that displays it on the page which would make is better in terms of SEO.
WordPress is ultra annoying when commenting code – reckon this is what you wanted:
<h1><?php echo HEADING_TITLE; ?></h1>
in your index page?
I agree that this would be much more suitable for SEO purposes – ally that to the changes made in the original post and my follow up comment and we have something that is more useful for every store.
My next addition would be to code up my own flavour of “Category/Manufacturer Descriptions” and print that in the index structure too. Thoughts? I know there is already some contributions for this, but I like coding my own where possible.
Sorry Gary, for SEO that should have been an h2 tag as there is a better place for the h1 tag and it is a good little trick. I sent you an email with where the h1 tag should go. It should be higher on the page.
Thanks Gary. I’m designing a site for my wife’s business and couldn’t for the life of me figure out how to remove this dumb line LOL. I really appreciate the help and tutorial.
John – you are welcome.
I ran into your post when I was trying to remove “what do we have here”, I have modify the the code in the index page catalog/includes/languages/english/index.php according to what you have and it still have not change anything. I also did it in the admin/tools/definepages and still nothing change.
Can you tell what the problem is? I mean I hard code the page in an editior and did it via the admin.
Benny – first up, rename your admin folder to something completely random, and change the /includes/configure file to match. Do that NOW.
For your question, it is possible that the template/theme that you are using is not using the language file as it should be – you see this a lot with theme providers. Not a lot more can be said, as you probably require 1 on 1 help to get the theme working properly.