HomePage › Forums › Themes Support › Triply – Tour Booking WordPress Theme › Custom Item Label (where it displays discount)
- This topic has 15 replies, 2 voices, and was last updated 1 year, 11 months ago by Billy Nguyen.
-
AuthorPosts
-
November 11, 2022 at 3:18 pm #29166marjandbkSupport Expired
Hello there,
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 #29211Hi you,
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 #29302marjandbkSupport ExpiredI 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”.
Thanks.
- This reply was modified 2 years ago by marjandbk.
November 15, 2022 at 4:52 pm #29306Please send the admin web account for me, I will check and try to help you.
November 16, 2022 at 6:12 pm #29343marjandbkSupport ExpiredThis reply has been marked as private.November 17, 2022 at 9:56 am #29363Hi,
I resolved this issue, please recheck your site: https://prnt.sc/l6klJXiQCya8
November 17, 2022 at 2:03 pm #29383marjandbkSupport ExpiredHey 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 #29414Hi,
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 #29445marjandbkSupport ExpiredI 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?
Thanks,
MarjanNovember 19, 2022 at 9:41 am #29450Ok, I removed this label, please recheck.
November 23, 2022 at 2:12 am #29520marjandbkSupport ExpiredLooking 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?
Thanks,
MarjanNovember 23, 2022 at 8:44 am #29523Hi,
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 #29553marjandbkSupport ExpiredAwesome, thanks so much, you are the best! 🙂
November 24, 2022 at 8:44 am #29555You 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 #29570marjandbkSupport ExpiredI just did it, thanks.
-
AuthorPosts
You must be logged in to reply to this topic.