Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi giuflavio

    The title just below the icons or Read More…when you click these links it takes to you at specific page.So why do you need link on icon??
    Or
    Where do you want to navigate user after clicking those icons??

    Best Regards!!

    Thread Starter giuflavio

    (@giuflavio)

    Yes I would like to add the link to the page icon also because smartphones is easier to click on the icon

    Hi giuflavio

    You can make your icon link to pages but you need to do some coding stuff.Follow the steps below.
    1. First you need to create and activate child theme.Reference here for child theme.
    2. After successfully creating and activating child theme.You now need to look in main theme’s folder inside inc folder you will find widgets.php file.
    3. In this file you will find below line:

    class WEN_Associate_Service_Widget extends WP_Widget {

    4. You need to copy and paste this whole class in child theme functions.php file.
    5. Now you will see below part inside that class class WEN_Associate_Service_Widget extends WP_Widget.

    <div class="service-block-inner">
    
                  <i class="<?php echo 'fa ' . esc_attr( $service['icon'] ); ?>"></i>
                  <div class="service-block-inner-content">

    6. Now replace this part with below code:

    <div class="service-block-inner">
    
                                <a href="<?php echo esc_url( get_permalink( $obj->ID ) ); ?>">
                                    <i class="<?php echo 'fa ' . esc_attr( $service['icon'] ); ?>"></i></a>
                                <div class="service-block-inner-content">

    7. Now all these edit you need to do in child theme’s folder functions.php file.
    Note: Please customize files of child theme, so your changes will not overwrite on theme update.
    Hope this will solve your problem.
    Report if any problem.

    Best Regards!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Insert link on icon service’ is closed to new replies.