re:Create a hyperlink to an entire Column

I followed this post: https://theme.co/apex/forum/t/create-a-hyperlink-to-an-entire-column/14302
To try to have my whole column be a link.

So I tried this, assigned each column with the ID I have in the javascript below.

`jQuery("#service-page-pharmacy").wrap("<a href='https://hybridpharm.com/ottawa-pharmacy-and-compounding/'></a>");` 

jQuery("#service-page-cannabis").wrap("<a href='https://hybridpharm.com/ottawa-medical-cannabis/'></a>");

jQuery("#service-page-cannabis").wrap("<a href='https://hybridpharm.com/ottawa-wellness-events/'></a>");

Here is what happens: https://imgur.com/a/EaY2EKB
The links do work, but now the columns are messed up.

I removed the code for now as we are live, but this is the page I was attempting it on: https://hybridpharm.com/services/

Thank you in advance!

Hi there,

Thanks for writing in! Please use the following code instead:

jQuery(document).ready(function($){
	$("#service-page-pharmacy > .x-raw-content").wrap('<a href="http://google.com/"></a>');
});

Then add the following code in the Theme Options > CSS:

#service-page-pharmacy {
    padding: 0;
}

#service-page-pharmacy .x-raw-content {
    padding: 100px;
}

This will wrap your first column with a link without disturbing the layout. You can follow the above method for the other columns as well. As you see this requires custom development and 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.

Hope this helps!

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