- This topic has 8 replies, 4 voices, and was last updated 6 years, 11 months ago by Tom.
-
AuthorPosts
-
March 17, 2017 at 1:04 am #293281Michiel
Hi Tom,
I want to show a blog post which is part of website 1, a service oriented website, on my other website, website 2. Website 2 is a pure blog-site where I installed the masonry option. Both websites have GP + GP premium.
I tried to link the blog post with a 301 redirection plugin, that works, but I am not totally happy with this solution as the URL changes so the visitor leaves the site.
Now I am thinking to copy the blog post from one site to the other. In that case I duplicate the content and I need to place a canonical tag. My question is: where in the blogpost should I put this tag?
(If you know another way to show a blog post on my other website please let me me know)
By the way, still very happy with GP!
Thx
MichaelMarch 17, 2017 at 8:02 am #293400LeoStaffCustomer SupportHi Michael,
Sorry I’m missing something but maybe you can insert the link to your other website like this so it opens up in a new tab?
<a href="https://URL-HERE" target="_blank">Blog Title</a>
Let me know if this helps.
March 17, 2017 at 8:24 am #293416MichielThank you Leo.
Please take a look at website 2, the blog-site. It is: derden.org.
You will see two blog post at the right hand corner:
– test, this is the blog post where I have added a link. Please click on the post.
– als u een organisatieadviseur uitnodigt etc: this post is redirected with a 301 redirection plugin. The visitor moves to website 1, which a don’t like.Therefore I was thinking to duplicate content of a blog from website 1 to website 2, but duplication is from a SEO point of view not recommendable. Experts say that you can prevent SEO-problems by putting a “canonical tag” between the head tags. But I do not know how to do that. Where do I find the “head” tags of a blogpost?
Thx
March 17, 2017 at 9:47 am #293455TomLead DeveloperLead DeveloperYou would have to use the wp_head hook in GP Hooks.
However, it would need to be inside a conditional so it only displays for that page.
For example:
<?php if ( is_single( 'your-post-slug' ) ) { ?> Canonical tag for yoursite.com/your-post-slug here <?php } ?>
Let me know if that helps or not 🙂
March 18, 2017 at 4:52 am #293772MichielThank you Tom, working with hooks is new for me and feels a bit tricky. I installed hooks and found GP-head.
I assume if I make a mistake it will be easy to correct. Just to be sure could you please evaluate the following:Q1: what to use in the first part: ‘your-post-slug’ or your-post-slug (with or without quotes?)
Q2: is this the right canonical tag: <link rel=”canonical” href=”http://yoursite1.com/your-post-slug.html” />
Q3: if I want to do the same operation for another post, can I just add one more line to WP-heads?So I am thinking to add the following to GP-heads:
<?php if ( is_single( ‘your-post-slug’ ) ) { ?>
<link rel=”canonical” href=”http://yoursite 1.com/your-post-slug.html” /><?php } ?>Thx
March 18, 2017 at 5:35 am #293794Michielto add another q: please evaluate when to use a single quote (‘) and when to use double quotes (“).
March 18, 2017 at 6:18 am #293812LeoStaffCustomer SupportHi there,
1. You would need to replace that with the actual post slug: http://www.wpbeginner.com/glossary/post-slug/.
Keep the quotation.2. Looks right. but you would need to replace “http://yoursite1.com/your-post-slug.html” to the actual link to your post.
3. I assume you would need to link to a different post? If so then yes.
May 7, 2017 at 11:56 am #315081v4ncouverCould you please provide an example of what to paste in the wp-head field if we want to add a canonical tag to landing pages?
Example:
Landing page 1 is for facebook
Landing page 2 is for kijijiBoth of the above pages are exactly the same as an already existing page that is part of the main website and to which the 2 above pages would point that tag to.
Thanks! 🙂
May 7, 2017 at 6:45 pm #315167TomLead DeveloperLead DeveloperWordPress adds the canonical tag for you based on your page structure.
However, if you’re using Yoast SEO, they have a field where you can add a custom URL: https://kb.yoast.com/kb/canonical-urls-in-wordpress-seo/
-
AuthorPosts
- You must be logged in to reply to this topic.