Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #896865
    Ann
    Participant

    Hello hello X!

    Is there a way to edit the individual woocommerce product page <h2> title?

    Thanks!

    Ann

    #897574
    Thai
    Moderator

    Hi Ann,

    Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    #897581
    Ann
    Participant

    Sure!

    Check the attached screen shot. Makes sense what I’m trying to do?

    #898168
    Christopher
    Moderator

    Hi there,

    Please add following code in Customize -> Custom -> JavaScript :

    jQuery("li.description_tab > a").html("custom text");
    jQuery("#tab-description h2").html("customtitle");
    

    Hope it helps.

    #899725
    Ann
    Participant

    Perfect!!

    Can I target individual page too? The title/text would be different on each page.

    Thanks,

    Ann

    #900687
    Thai
    Moderator

    Hi Ann,

    Please update the previous code a bit:

    jQuery(".page-id-123 li.description_tab > a").html("custom text");
    jQuery(".page-id-123 #tab-description h2").html("customtitle");

    Replace 123 number with your page ID(https://community.theme.co/kb/how-to-locate-post-ids/).

    Hope it helps 🙂

    #905187
    Ann
    Participant

    Perfect!

    And if I wanted to do this on multiple pages, I just repeat the code and swap out the page #?

    Also, this might be out of your scope of service but thought I’d ask at least. Is it possible to change the text “out of stock” to “sold” for woocommerce products that are no longer available?

    Thanks,

    Ann

    #906131
    Jade
    Moderator

    Hi Ann,,

    That is correct. If you are pasting the code in the JS customizer and you aim to target multiple pages then you can separate the CSS selector with a comma like this:

    jQuery(".page-id-123 li.description_tab > a, .page-id-124 li.description_tab > a").html("custom text");
    jQuery(".page-id-123 #tab-description h2, .page-id-124 #tab-description h2").html("customtitle");

    As for the text in Woocommerce, kindly check on some Text Replace plugins as it might help you achieve the change of text you require.

    Hope this helps.

    #907894
    Ann
    Participant

    Thanks so much for your help!

    I’m so amazed about the level of support you guys offer, thanks!

    Ann

    #908042
    Thai
    Moderator

    You’re very welcome 🙂

    If you need anything else please let us know.

  • <script> jQuery(function($){ $("#no-reply-896865 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>