Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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

    #758696

    Hey 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,
    Rikard

    #758963

    Hi 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

    #761169

    Hi,

    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 Torvik

    #761356

    Hi 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

    #761357

    Hey!

    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,
    Yigit

    #764830

    Hi 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

    #765200

    Hi,

    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.
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.