Link entire card element instead of button

Hello,

I have three card elements that link to different pages on my website. I’ve gotten feedback that it would be easier if the entire card itself were clickable instead of just the button on the back on the card. Is this possible? Or is there another element you would recommend? They don’t necessarily need to flip but I’d like the keep the same style. See secure note.

Hi Kacie,

Thank you for reaching out to us. You can do this with a custom script, try adding the following code in the Theme Options > JS:

jQuery(document).ready(function($){
	$('div[data-x-element="card"]').each(function(){
		var btn_link = $(this).find('.x-face-button').attr('href');
		$(this).wrapInner('<a href="'+ btn_link +'"></a>');
	});
});

Please note that the code provided above serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Don’t forget to clear all caches including your browser’s cache after adding the code. Let us know how this goes!

Thank you! It worked great.

You’re most welcome, Kacie.

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