- This topic has 9 replies, 3 voices, and was last updated 3 weeks, 4 days ago by
David.
-
AuthorPosts
-
October 6, 2020 at 4:12 am #1474377
David
Hi,
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:
homepage
/built-from-scratch/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
Ha!
Solved it!
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 #1474489David
StaffCustomer SupportHi there,
glad you found the answer 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 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.
Regards,
RobFebruary 5, 2021 at 7:32 am #1647124David
StaffCustomer SupportHi there,
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 Site
display location will cover the entire site. This would be Global scope.
Or a wide scope Display Rule could bePosts > All Posts
You can match Locations with Exclusions. For example: Location: Entire Site and Exclude: Page > A specific page.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 5, 2021 at 8:40 am #1647212Robert
Hi David,
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?
Regard,
RobFebruary 5, 2021 at 1:36 pm #1647493David
StaffCustomer SupportWhich translation plugin are you using ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 5, 2021 at 1:55 pm #1647507Robert
I’m not.
I am just doing it using the hook element to avoid another plugin.
Maybe not saving anything?Thanks
February 5, 2021 at 2:05 pm #1647518David
StaffCustomer SupportHmmm…. 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:
https://generatepress.com/forums/topic/header-layout-control-for-client/#post-1421567
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.