Tagged: x
-
AuthorPosts
-
April 23, 2016 at 1:53 pm #896865
AnnParticipantHello hello X!
Is there a way to edit the individual woocommerce product page <h2> title?
Thanks!
Ann
April 24, 2016 at 12:29 pm #897574
ThaiModeratorHi 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.
April 24, 2016 at 12:34 pm #897581
AnnParticipantSure!
Check the attached screen shot. Makes sense what I’m trying to do?
April 25, 2016 at 1:48 am #898168
ChristopherModeratorHi 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.
April 26, 2016 at 12:19 am #899725
AnnParticipantPerfect!!
Can I target individual page too? The title/text would be different on each page.
Thanks,
Ann
April 26, 2016 at 12:39 pm #900687
ThaiModeratorHi 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 🙂
April 29, 2016 at 12:17 am #905187
AnnParticipantPerfect!
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
April 29, 2016 at 3:09 pm #906131
JadeModeratorHi 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.
May 1, 2016 at 10:06 am #907894
AnnParticipantThanks so much for your help!
I’m so amazed about the level of support you guys offer, thanks!
Ann
May 1, 2016 at 11:44 am #908042
ThaiModeratorYou’re very welcome 🙂
If you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-896865 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
