[Resolved] Add html to product descriptions

Home Forums Support Add html to product descriptions

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #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!

    #1135021
    johnaps

    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!

    #1135179
    David
    Staff
    Customer Support

    Hi 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.

    #1135863
    johnaps

    Is there a way to make the text on product pages have a hidden link?

    I tried using

    on woocommerce_before_single_product_summary

    and

    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!

    #1135868
    David
    Staff
    Customer Support

    Can you share the HTML you’re trying to add ?

    #1138185
    johnaps

    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

    #1139927
    johnaps

    If you can please forward this to Tom! Thank you!

    #1140535
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Can you explain a little more about what you’re trying to accomplish? What is this link going to do?

    Thanks!

    #1140642
    johnaps

    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?

    #1140805
    Tom
    Lead Developer
    Lead Developer

    So the idea is if someone copies your content, they’ll copy a link to your site along with it?

    #1140819
    johnaps

    Yep a hidden link in the html!

    #1140828
    Tom
    Lead Developer
    Lead Developer

    Wouldn’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/

    #1140831
    johnaps

    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…

    #1141706
    Tom
    Lead Developer
    Lead Developer

    I 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.

    #1198231
    johnaps

    Thank you for your advice!!!

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.