Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #628439
    Launch48
    Participant

    How can I make the image a link in the Feature Box element? I can add a link, but it adds it as yet another line of text below the title and content – the image is really what people would click on, so why can’t I add a link directly to the image? Also, is there even a way to add a link to the text without using the “link” box? I.e. if I want to link my nicely formatted feature box title, rather than trying to reformat the ugly link to look like a title, how do I do that? This seems like an obvious feature and I don’t know why I can’t find instructions or a support article on this already.

    #628601
    Darshana
    Moderator

    Hi there,

    We certainly appreciate the feedback! This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive.

    Thanks!

    #647181
    guybower1
    Participant

    Agreed. This would be a great feature. Meanwhile, does anyone have tips for a work around?
    Guy

    #647252
    Rad
    Moderator

    Hi there,

    Here is workaround that you could use, but make sure that you will utilise the link option of the feature box. This code will simply transfer the link to the icon.

    Add this code at Admin > Appearance > Customizer > Custom > Javascript :

    jQuery ( function( $ ) {
    
    $('.x-feature-box-text a:last-child').each( function() {
    
    $( this ).parent().parent().parent().find('.x-feature-box-graphic-inner i').wrap( '<a href="' + $( this ).attr('href') + '"></a>' );
    $( this ).remove();
    
    } );
    
     } );

    Tested and working, cheers!

    #658806
    DoebankDesigns
    Participant

    I saw a variation of this code in another discussion. I’ve tried both, but neither seems to work for me. Sure would love to get this working. Any ideas?

    #659089
    Christian
    Moderator

    Hey there,

    Further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding.

    #686519
    LiquidPrintOne
    Participant

    Try this instead.. looks like there was a typo in the script:

    jQuery ( function( $ ) {
    
    $('.x-feature-box-text a:last-child').each( function() {
    
    $( this ).parent().parent().parent().find('.x-feature-box-graphic-inner img').wrap( '<a href="' + $( this ).attr('href') + '"></a>' );
    $( this ).remove();
    
    } );
    
     } );

    Also make sure you have something in the “Link Text” field of the feature box or this will not work.

    #687241
    Lely
    Moderator

    Hello There,

    Thank you for sharing your custom code. Hope this helps other members of the community.

    Always,
    X

    #729674
    smlombardi
    Participant

    The JS does not work for me either.

    Do I put the link in the “link text” field in addition to “href”. You say “Something” which is not helpful.

    #729752
    Rupok
    Member

    Hi @smlombardi

    This a working code and that worked for other users. Make sure to put some text (as you wish) on the “Link Text” field and your URL/Link to the HREF field.

    Hope this makes sense.

    Cheers!

    #735714
    emarioc
    Participant

    Thank for sharing the JQuery – please help me to understand where exactly I place this code in my site. I don’t see an area to add this to the feature box – thanks!!!!!!

    #735771
    Paul R
    Moderator

    Hi,

    You can add it under Appearance > Customize > Custom > Javascript.

    Thanks

    #735817
    emarioc
    Participant

    Thank you,

    I placed the script in the area instructed and also tried it under setting JS in Cornerstone. The result is that the link text does not display in the feature box. I think this is by design of the script. However it unfortunately does not result in the feature box , the icon or any of the text becoming a link.

    I understand as you stated above that is custom programming and not supported here. We are just trying to find a way to link these very stylish icons to in this case the services they summarize.

    I did see some code posted here in the forum for use in the Content area that would also wrap the box making it a link. I will seek that out.

    #735907
    emarioc
    Participant

    LiquidPrintOne, (https://community.theme.co/users/liquidprintone/)

    I did place the script however I am not able to get this to work. Can you provide any guidance? Much appreciation!!!

    #736073
    Rupok
    Member

    Hi there,

    Is it your website? – http://www.decodip.com

    I can see the link is working for the Feature Boxes here – http://prntscr.com/9n78a2

    Could you confirm that?

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-628439 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>