- This topic has 9 replies, 3 voices, and was last updated 3 weeks, 4 days ago by David.
October 6, 2020 at 4:12 am #1474377David
I’ve recently implemented hreflang tags across a pair of sites (added to private info), both using GP premium.
I’ve used Elements – wp-head, to add them and it has worked on all pages and posts with the exception of:
The pages on which they appear properly and those on which they don’t are the same on the two sites.
Could you have a look for me? I’ll also include login details.October 6, 2020 at 5:00 am #1474434David
Those two pages are my home page and my blog page. It turns out in Elements’ Display Rules there are specific locations for ‘Front Page’ and ‘Blog’. I’d been using ‘Page’ for all, and then selecting the relevant page from the dropdown.
All working fine now.
Cheers!October 6, 2020 at 5:00 am #1474435David
Resolved.October 6, 2020 at 5:52 am #1474489DavidStaffCustomer SupportFebruary 5, 2021 at 6:38 am #1646855Robert
Hi David, (am trying to contact the original question setter)
I am looking to do the same thing (adding Hreflang tags) to my own website. I wondered if you could explain how you did it?
Did you need to create a new element for each page/post?
I am doing it within one domain not two sites but think otherwise it is the same.
I hope to hear from you.
RobFebruary 5, 2021 at 7:32 am #1647124DavidStaffCustomer Support
no need for multiple Elements.
For each Element you can set any number of Display Rules. Or use a single display rule that covers your needs.
For example the
Entire Sitedisplay location will cover the entire site. This would be Global scope.
Or a wide scope Display Rule could be
Posts > All Posts
You can match Locations with Exclusions. For example: Location: Entire Site and Exclude: Page > A specific page.February 5, 2021 at 8:40 am #1647212Robert
Thank you for your reply. I was expecting from the other David that first posted but Im sure you can still help, thank you.
I am looking to use Hreflang tag which is for telling Google about alternative pages in different languages. I therefore have to reference specific pages (the alternative languages) within the element.
I think I therefore need a new element for each page that is then located in the ‘head’ of each language version of that page, which I can do using the drop down options.
I have done this and it seems to work.
My question is:
If I have lots of elements, (if I translate 100+ pages this would require 100+ Hook Element) will it slow down the whole website or just the slow the pages where the Element is applied?
Do you know of a better method?
RobFebruary 5, 2021 at 1:36 pm #1647493DavidStaffCustomer SupportFebruary 5, 2021 at 1:55 pm #1647507Robert
I am just doing it using the hook element to avoid another plugin.
Maybe not saving anything?
ThanksFebruary 5, 2021 at 2:05 pm #1647518DavidStaffCustomer Support
Hmmm…. it would be good if there was a way of identifying the language such as Taxonomy term. Are the foreign language posts in a separate category or ? If so then you can use the Post Category or Post Tags display rule.
If there is no specific category/tag term – then you can register a custom taxonomy for your display rules – see this topic:
- You must be logged in to reply to this topic.