-
AuthorPosts
-
March 8, 2017 at 5:33 pm #757934
Hi!
I’ve found an older post where you made the columns clickable and that work great, but I would like to make the background image
with the TV clickable?Is there a way to add a link feature in this content area as well?
Marcel
March 10, 2017 at 6:43 am #758696Hey vossenm,
You could try to wrap your section in two code blocks, one before and one after:
Code block:
<a href="http://yoursite.com/link">
Color Section
Code block:
</a>
Best regards,
RikardMarch 10, 2017 at 3:48 pm #758963Hi there Rikard,
When I do this, I get white bars above and below the block with the TV picture, but no clickable image?
I did it by dragging code blocks before and after the content section of the page. Maybe I should do it in a different way?Marcel
March 15, 2017 at 7:03 am #761169Hi,
To solve your problem, you need to follow these steps:
1. You need to enable the custom CSS field adding this line code in your function.php (with this code, you`ll be allowed to add a custom class in the advanced editor).
add_theme_support('avia_template_builder_custom_css');
You can learn more about it here: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/
2. Create a column and add a custom class: clickable-box.
3. Now, inside the column, you`ll add the link in a text block.
4. And then, it’s required to add this script in the functions.php:
function add_custom_div(){ ?> <script> jQuery(".clickable-box").click(function(){ window.location = jQuery(this).find("a:first").attr("href"); return false; }); </script> <?php } add_action('wp_footer', 'add_custom_div');
and this CSS at the Enfold Theme Options > General Styling > Quick CSS
.clickable-box { cursor: pointer; } .clickable-box a { display: none; }
Let me know if you have questions about this process.
Best regards,
John TorvikMarch 15, 2017 at 12:40 pm #761356Hi there,
I have put the code in my child theme files and the clickable-box class in the custom CSS field of the Content section that holds the background.
I don’t understand this step though: 3. Now, inside the column, you`ll add the link in a text block.
If I put the link in a text box, it is visible on the site right? Or where else should I put the link that is connected to the background?Marcel
March 15, 2017 at 12:42 pm #761357Hey!
Yes, it would be visible. If you would like to hide it, please add it as following
<a href="http://kriesi.at" class="hidden"></a>
Best regards,
YigitMarch 22, 2017 at 3:35 pm #764830Hi there,
Did you change something in the site by any chance?
I now noticed that the text block on the left of the homepage will become invisible as soon as I put a link in the Column Link field of the 1/2 column?The link works great but I was wondering why the text is now invisible even though I didn’t change anything as far as I know…
Marcel
March 23, 2017 at 7:32 am #765200Hi,
We didn`t edit your text block, so, to check this problem, may you share with me your WP credentials?
Best regards,
John Torvik- This reply was modified 7 years, 8 months ago by John Torvik.
-
AuthorPosts
- You must be logged in to reply to this topic.