Post by cosmicx » Mon Dec 09, 2013 9:11 pm

I am setting up a Wordpress plus+ OpenCart [v1.5.5.1] webiste.
Wordpress in root, OpenCart in /store sub-directory
Like so,

Code: Select all

http://mydomain.com

Code: Select all

http://mydomain.com/store
I have identical footer, OpenCart footer is adapted to Wordpress footer.
Information pages have separate and the same copy available for both OpenCart and Wordpress.

So the About Us Page [...to be SEO Optimized] is accessible by;

Code: Select all

http://mydomain.com/about-us
...under Wordpress

Code: Select all

http://mydomain.com/store/about-us
...under OpenCart

Now... I want http://mydomain.com/about-us to be the canonical link.
So I want to put the

Code: Select all

rel="canonical"
in Information Page > About Us

Code: Select all

http://mydomain.com/store/about-us
I am trying to edit my controller file... information.php
and put this code...

Code: Select all

$this->document->addLink($this->url->link('information/information', 'information_id=' . $this->request->get['information_id']), 'canonical');
I've copied and adapted the code above from the controller file product.php , but it's not working.
I don't have php knowledge but I am willing to follow any guide or instructions.

I am wanting to accomplish this because I think Google will take my About Us page as Duplicate Contents. But they really are duplicates.

UPDATE:

I am also trying this to work, with no success.

UPDATE:

If my duplicate About Us page does not have any SEO Negative Impact, then I don't require this anymore. Or I will just have to block the other About Us page to not to be indexed by Search Engines.

UPDATE

I've successfully added the canonical link, but need some modification.
I need to strip out route and just get the information id, need further help please.

This above code is working and place it in another line like below,

Code: Select all

$this->data['heading_title'] = $information_info['title'];
$this->document->addLink($this->url->link('information/information', 'information_id=' .  $information_id), 'canonical');
I need to print the canonical link like so...

Code: Select all

<link href="http://mydomain/about-us" rel="canonical" />
The link is not necessarily dynamic, just need to get the informaion id plus hardlink to the root domain.
Last edited by cosmicx on Wed Dec 11, 2013 3:31 am, edited 6 times in total.

Active Member

Posts

Joined
Mon Jan 09, 2012 6:27 pm

Post by labeshops » Mon Dec 09, 2013 9:48 pm

Why not just have 1 about us page and link the other site to it??

Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by cosmicx » Tue Dec 10, 2013 12:37 am

I thought of that too...

But, I don't like USERS who are interested and want to only browse STORE SECTION of the website be, transferred to the About Us page of the WP area, and vice-versa.

So users who are browsing the Store Section, and decided to look and read the About Us page, will still remain in the Store Section of the website. And the same with the case of the Blog Section.

Active Member

Posts

Joined
Mon Jan 09, 2012 6:27 pm

Post by cosmicx » Wed Dec 11, 2013 3:32 am

Any help please???

Active Member

Posts

Joined
Mon Jan 09, 2012 6:27 pm
Who is online

Users browsing this forum: No registered users and 4 guests