Roughly translated:
If this page is the homepage show config_title else show the rest of this script (containg seo details and config_name).
Similar to this I suppose:
Code: Select all
<?php if (isset($this->request->get['route']) && $this->request->get['route'] != 'common/home') { ?>
<title><?php echo $title; ?> | <?php echo $this->config->get('config_store'); ?></title>
<?php } else { ?>
<title><?php echo $title; ?></title>
<?php } ?>
Can PHP’rs got a clue??
Any help appreciated.
Product name - Manufacturer name - Store name
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Code: Select all
/catalog/controller/product/product.php
Code: Select all
$this->document->title = $product_info['name'];
Code: Select all
$this->document->title = $product_info['name'] . ' - ' . $product_info['manufacturer'];
You code works but I adjusted it a bit:
Code: Select all
$this->document->title = $product_info['name'] . $this->language->get('text_by') . $product_info['manufacturer'];
Code: Select all
$_['text_by'] = ' by ';
Now we need to get the <H1> and </H1> in the title...MacBook by Apple | Your Store
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
By Y~: This works for me~ thanks!Melanie wrote:Melanie wrote:Chrissy Poo wrote:OK this is thread has really helped me out which is cool
I replaced my title tag with this code from above:and it produces the following page titles:Code: Select all
<title> <?php # BEGIN - titleBreadCrumbs if(!empty($this->document->breadcrumbs)) { $titleBreadCrumbs = array(); foreach($this->document->breadcrumbs as $breadcrumb) { if($breadcrumb['text'] != $this->language->get('text_home')) $titleBreadCrumbs[] = $breadcrumb['text']; } $titleBreadCrumbs = array_reverse($titleBreadCrumbs); echo implode(' - ', $titleBreadCrumbs) . ' - '; } echo $this->config->get('config_title'); # END - titleBreadCrumbs ?> </title>
Sub Category - Category - Store Name
is there a way to reverse this so it says:
Store Name - Category - Sub Category
Any ideas?
How can I make it show Sub Category - Category - Store Name
But for the store name just the company name i.e. MY COMPANY
instead of MY COMPANY - I SPECIALIZE IN XYZ
Thanks,
Melanie
Done.
Changed 'config_title' to 'config_name'
Be creative! Be passion!
I want to get the <H1> and </H1> added to the title so the when when I look at my page source I see <H1>My Title</H1>, how do I go about getting this in?Qphoria wrote: (v1.3.4 and later)
1b. Edit catalog/view/theme/default/template/common/header.tpl
2. FIND:3. REPLACE WITH:Code: Select all
<title><?php echo $title; ?></title>
Code: Select all
<?php if (isset($this->request->get['route']) && $this->request->get['route'] != 'common/home') { ?> <title><?php echo $title; ?> | <?php echo $this->config->get('config_store'); ?></title> <?php } else { ?> <title><?php echo $title; ?></title> <?php } ?>
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Gentle BUMPi2Paq wrote:I want to get the <H1> and </H1> added to the title so the when when I look at my page source I see <H1>My Title</H1>, how do I go about getting this in?Qphoria wrote: (v1.3.4 and later)
1b. Edit catalog/view/theme/default/template/common/header.tpl
2. FIND:3. REPLACE WITH:Code: Select all
<title><?php echo $title; ?></title>
Code: Select all
<?php if (isset($this->request->get['route']) && $this->request->get['route'] != 'common/home') { ?> <title><?php echo $title; ?> | <?php echo $this->config->get('config_store'); ?></title> <?php } else { ?> <title><?php echo $title; ?></title> <?php } ?>
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
<title><h1>My Title</h1></title>
If so, don't do it as it's not the way meta tags work. <title>My Title</title> is perfect.
http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk
I've been told by a SEO guru once that this should be done.Chones wrote:Do you want something like this?
<title><h1>My Title</h1></title>
If so, don't do it as it's not the way meta tags work. <title>My Title</title> is perfect.
After I did this to my osCommerce store my titles started to be noticed by Google....
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
<title>Your Title</title>
Headings should be used properly too - you should only have one <h1> heading on your page and it should contain as many keywords and phrases as you can fit in without it looking spammy.
Take it from someone who regularly tops Google results even although I only have a few links to my site.
http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk
I think maybe there was some wording disconnect. I'm assuming that in terms of formatting, he mentioned that your "Page Title" should be in <h1> (not <H1>) which is true, for formatting sake, h1 should be on your page only once and should be the page title. This is not the same thing as the "meta title" which is the <title> tag. Anything inside the <head> tag does not use formatting and just shows as literal text.i2Paq wrote:I've been told by a SEO guru once that this should be done.Chones wrote:Do you want something like this?
<title><h1>My Title</h1></title>
If so, don't do it as it's not the way meta tags work. <title>My Title</title> is perfect.
After I did this to my osCommerce store my titles started to be noticed by Google....
Maybe I'm wrong and he has some trickery that I dunno about but it is certainly just going to show <h1> as if it were plain text
i am simply using <?php echo $store; ?> which displays store name on title bar..
is this a correct way to get your store name | page title?
Code: Select all
<?php if (isset($this->request->get['route']) && $this->request->get['route'] != 'common/home') { ?>
<title><?php echo $store; ?> | <?php echo $title; ?></title>
<?php } else { ?>
<title><?php echo $title; ?></title>
<?php } ?>
Code: Select all
$this->document->title = $product_info['name'];
Code: Select all
$this->document->title = $product_info['name'] . ' - ' . $product_info['manufacturer'] . ' : ' . $category_info['name'];
Product Name - Category - Store Name
or if it's easier, even just Product Name - Store Name
But only on product pages? I've already gotten it to include a custom subtitle on category pages using a nifty vqmod I found here and this code above replaces that which I don't want.
Thanks
Users browsing this forum: No registered users and 38 guests