Private: Home › Forums › WordPress Themes › Elvyre – Retina Ready WordPress Theme › How to hyperlink whole Development Process box › Reply To: How to hyperlink whole Development Process box
Hello,
It can be done by modifying the php files, but I’ve found another, much simpler solution.
So, you need to add this jquery code to any of your .js template files (for example, I added it to include.js):
$("section.process-box").each(function(index) {
if($(this).find("a").length) {
var link = $(this).find("a").attr("href");
$(this).find("a").contents().unwrap();
$(this).wrap( "<a href='"+ link +"'></a>" );
}
});
If you are going to add it to include.js, I advise you to add it after 192nd line of that file, after the code:
// function to check is user is on touch device
function is_touch_device() {
return Modernizr.touch;
}
This simple scripts iterates through all your development boxes and if it finds the <a>
tag, it removes it from the text and wraps the whole development box in the same link.
So, all you have to do after pasting the code is to link the text of the development box as you did before.
I’ve attached some screenshots – one is the location of the pasted code, and one is of the linked text inside development box.
Let me know if it works for you,
Robert