Edit and redirect buy now button

Hi,

In the ExpertHive theme there is a “Buy Now” button when clicking on listed Service. I want to change the name of that button and also add a custom link to it as I am using the external Booking Plugin “BookingPress” to enable Bookings. This means I am using the whole logic of HivePress (Marketplace, Listings, etc.) but I want users to book appointments via a button that redirects users to BookingPress.

As there already is the “Book Now” button, I just want to customize it so I can use it the way I just described, can you please help me with that? I cannot find it even in the File Manager of my Hosting Service so I could change the code. I already created a Child Theme.

Looking forward to your answer, thanks!

Hi,

In your described case, it would be easier to disable the Marketplace extension and create a custom attribute of the URL type, displaying it as a primary button. These resources can be helpful: How to add a WhatsApp button - HivePress Help Center, or a solution from this topic.

Please note that the Bookings extension will not pass the selected dates when clicking on such a link. So if you’re handling booking functionality externally, you can also disable Bookings.

If the price is hidden when using the Marketplace, you can also add it as a custom attribute and assign it to the primary button on both the listing page and the primary block.

Hope this helps

Okay thanks! I will try that and see if it works.

Hi Ksenia,

I created a custom attribute of the URL type, so that a link can be put into the listing when creating one. The problem is, when I now click the button in the listing with the given code that is suggested on the help center to create a WhatsApp button, it automatically still opens WhatsApp Web.

Is there a way to change the code, so that the button opens up the link that was put in the attribute? and not the WhatsApp link?

I hope you can help me, thanks!

Hi @Leon,

It sounds like you just need to edit the link in the code.

Try this instead:

<a href="%value%" target="_blank" class="button button--large button--primary hp-button--wide">Visit Website</a>

I hope this helps!

Cheers,
Chris :victory_hand:

1 Like

Hi,

It seems you copied the entire code without any adjustments. Please follow ChrisB recommendation to change the link.

1 Like

Thanks a lot! This solved the issue perfectly :slight_smile:

1 Like

Glad that the community helped!

If you have a minute, please rate HivePress on the WordPress repository or TrustPilot. Your feedback means a lot to us and makes a real difference in helping us grow.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.