- This topic has 15 replies, 3 voices, and was last updated 3 years, 8 months ago by
Tom.
-
AuthorPosts
-
January 17, 2020 at 6:02 am #1134992
johnaps
Hello!
I want to add a small div with a link attribute on all my product descriptions but as i have over 2k products i cant do it by hand one by one…
I have found the description.php in woocommerce files that maybe i can change a bit to accomplish that but i am not very used on php…
Can you tell me where i can implement my html code so it will be imported on all product descriptions?
*Its important it will be on product descriptions as what i am trying to achieve with my html is “copyright protection” with a div that will link back to my site if anyone copies my product description*
Your help would be greatly appreciated!
January 17, 2020 at 6:31 am #1135021johnaps
If you please can forward this directly to Tom it would be very much appreciated, any idea would be very helpful…
I know it isnt about fixing or extending gp capabilities but i think Tom could help me out. If it isnt much trouble please sent it directly to him!
Thank you for your time!
January 17, 2020 at 6:51 am #1135179David
StaffCustomer SupportHi there,
You can use the Hook Element to insert the HTML:
https://docs.generatepress.com/article/hooks-element-overview/
The list of available hooks for the single product can be seen here:
https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/
You will find most of them available in the Hook Element.
January 18, 2020 at 4:31 am #1135863johnaps
Is there a way to make the text on product pages have a hidden link?
I tried using
on woocommerce_before_single_product_summaryand
on woocommerce_after_single_product_summary
but when i copy the whole text, the div link isnt visible on my html editor..
Maybe there is a way to implement some php code there to put a hidden link somehow to all text in product description?
If you can forward it to Tom, it would be very helpful as i think he maybe the only one that he can be of help.
If you can forward it, and bounce any idea with me, it will be greatly appreciated.
Thank you for your time!January 18, 2020 at 4:37 am #1135868David
StaffCustomer SupportCan you share the HTML you’re trying to add ?
January 20, 2020 at 9:46 am #1138185johnaps
I tried using
“div action=”my-site-url””
on woocommerce_before_single_product_summary
and
“/div”
on woocommerce_after_single_product_summary
but that didnt work as expected…
Maybe there is a way to implement some php code there to put a hidden link somehow to all text in product description?
i used ” instead of <> because of visibililty problems in your reply post form
January 22, 2020 at 12:07 am #1139927johnaps
If you can please forward this to Tom! Thank you!
January 22, 2020 at 9:21 am #1140535Tom
Lead DeveloperLead DeveloperHi there,
Can you explain a little more about what you’re trying to accomplish? What is this link going to do?
Thanks!
January 22, 2020 at 11:45 am #1140642johnaps
Hello Tom, first i wanna thank you for your time!
What i am trying to do is protecting my content when someone copies it…
As there are many ways to scrape data off a site i thought and wanted to make all text on my product descriptions have a hidden link to my site nested inside the html…Thats what i tried doing with the div, but didnt work…
Do you have any ideas?
January 22, 2020 at 4:08 pm #1140805Tom
Lead DeveloperLead DeveloperSo the idea is if someone copies your content, they’ll copy a link to your site along with it?
January 22, 2020 at 4:25 pm #1140819johnaps
Yep a hidden link in the html!
January 22, 2020 at 4:37 pm #1140828Tom
Lead DeveloperLead DeveloperWouldn’t they just remove the link once they pasted it elsewhere?
Would it be better to just prevent copy/pasting your content?: https://wordpress.org/plugins/wp-content-copy-protector/
January 22, 2020 at 4:42 pm #1140831johnaps
A data entry company that i hired had some products copied from a competitor of mine and those products had in the html description at the start a div action=”competitorurl” that did a backilink to him… Ofc that was done by a mistake but i am trying to replicate that situation to my advantage… Isnt there a way to implement a link not necessarily with href, that is hidden in the description html;
I dont really know , i would like your opinion on that…
January 23, 2020 at 9:34 am #1141706Tom
Lead DeveloperLead DeveloperI don’t think that would count as a backlink, and doing something like this would likely just make Google mad (it’s not exactly ethical).
I think you’d be better off using the plugin I mentioned – it will prevent people from copying your text, and you don’t risk making Google mad.
March 18, 2020 at 4:49 am #1198231johnaps
Thank you for your advice!!!
-
AuthorPosts
- You must be logged in to reply to this topic.