November 11, 2022 at 3:18 pm #29166
Is it possible to put custom text on homepage where discount label appears?
<span class=”item-label price_discount”>20% OFF</span>
For some items i would like to display:
<span class=”item-label price_discount”>BOOKING FOR 2023. OPEN</span>
Thanks!November 14, 2022 at 9:39 am #29211
Please copy all files on this folder triply/template-parts/booking/block
and paste to child-theme then edit code:
$discount = $post['discount'] ? '<span class="item-label price_discount">' . $post['discount'] . '% ' . esc_html__( 'OFF', 'triply' ) . '</span>' : '';
=> Edit into:
$discount = $post['discount'] ? '<span class="item-label price_discount">' . $post['discount'] . '% ' . esc_html__( 'BOOKING FOR 2023. OPEN', 'triply' ) . '</span>' : '';November 15, 2022 at 3:19 pm #29302
I don’t understand working with child themes (even tho it looks like i have one on the website and its activated!?), is there any other option? I don’t want to lose discount functionality I just want one item on the homepage to have label “BOOKING FOR 2023. OPEN”.
November 15, 2022 at 4:52 pm #29306
- This reply was modified 2 weeks ago by marjandbk.
Please send the admin web account for me, I will check and try to help you.November 16, 2022 at 6:12 pm #29343This reply has been marked as private.November 17, 2022 at 9:56 am #29363November 17, 2022 at 2:03 pm #29383
Hey Bill, thanks, but this is not what I wanted. I want some items to have discount and some label “booking open for 2023.”.
The “Big game fishing” item should have discount as it was before.
Items “Kayak fishing” and “Fish&Walk” should have “booking open for 2023.”.November 18, 2022 at 9:29 am #29414
Oh, you need to add more customization to display, not edit this display 😀
To do this customization, you will need to add custom code to add the display option in each booking object, then check this option and display according to the selected config.
This request seems to be more complicated than the custom code I made earlier, so I will charge an additional fee for customization if you want to make this request.November 18, 2022 at 11:51 pm #29445
I understand, I will not go for it for now 🙂 Is it possible to remove the label and just return the discount label as it was before?
MarjanNovember 19, 2022 at 9:41 am #29450
Ok, I removed this label, please recheck.November 23, 2022 at 2:12 am #29520
Looking good now but i can still see this line in all the files (from item-block-1.php to item-block-8.php) of the child template:
$discount = $post[‘discount’] ? ‘<span class=”item-label price_discount”>’ . esc_html__( ‘BOOKING FOR 2023. OPEN’, ‘triply’ ) . ‘</span>’ : ”;
Is it ok that that stays there?
MarjanNovember 23, 2022 at 8:44 am #29523
I have renamed the inscription folder to block.bak so that the overwritten files are not executed: https://prnt.sc/qdwqcFeGAXGa
Later if you want to overwrite these files, you can rename this folder to block and customize the item-block files.November 24, 2022 at 5:20 am #29553
Awesome, thanks so much, you are the best! 🙂November 24, 2022 at 8:44 am #29555
You are welcome!
Let me know if you need to help and hope you will vote 5 stars for our theme.
Thanks./November 24, 2022 at 3:31 pm #29570
I just did it, thanks.
You must be logged in to reply to this topic.