Make Headline Primary Graphic Link

Hi there. I’m trying to get the Primary Graphic to also be a link in the headline. Is this possible?

You can see it in action here, in the attorney listing on the right: http://aanda.co/adamsjones/home/practice-areas-new/real-estate/

Thanks!

Hi @applesandarrows,

Thank you for reaching out to us. You can do this with custom scripting. Please add the following code in the Theme Options > JS:

jQuery(document).ready(function($){
	$('.x-text-headline').each(function(){
		var link = $(this).find('.x-text-content-text-primary a').attr('href');
		$(this).find('.x-graphic img').wrap('<a href="'+ link +'" ></a>')
	});
});

The above code will get the link of your title and add it to your image for each of your list items.

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. Hope this helps!

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