badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Service Icon Links

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #26147
    Caitlyn
    Participant

    Hi there,

    I have seen a few people post about this subject but it was over a year ago so I was wondering if theme horse was thinking about adding service icon links to the appropriate pages in a future update? While the “read more” link is fairly obvious to see on a computer, it is not on a mobile phone and my first instinct is to tap the icon while scrolling through. If there are any coders reading this, do you have any simply suggestions to add this?

    The theme is beautifully build otherwise and I am really enjoying working with it.
    Thanks for your time.

    Caitlyn

    #26157

    Hi Caitlyn,

    We have designed our theme this way. To add the link in your service icons you may just create a child theme and under functions.php file create your widgets and register them. Just copy the parent widget, change the name of widget like Theme Horse Child: Service widgets, make customisation and create your custom widget. If you do this, the widgets of parent theme and child both will appear. Use your custom widget of child theme instead of the parent theme.
    Just making same file structure in the child theme like /inc/widgets won’t overwrite the parent file. Hope this helps.

    Thank you!

    #26260
    Chama
    Participant

    Hi.

    Could you please let us know how to link services with their pages?

    It doesn’t make any sense to link them to our homepage…

    Thanks

    #26287

    Hi Chama,

    go to the theme folder -> inc ->widgets -> interface_widgets.php. Can you see this code on line no 329 to 333

    <?php 
     if ( has_post_thumbnail() ) {
     	echo'<div class="service-icon">'.get_the_post_thumbnail( $post->ID, 'icon' ).'</div>';						}
    ?>

    Replace above code with this below code

    <?php 
     						if ( has_post_thumbnail() ) {
     							echo'<div class="service-icon"><a href="'.get_permalink() .'">'.get_the_post_thumbnail( $post->ID, 'icon' ).'</a></div>';
     						}
     						?>

    Now you can have a link in services icon. Just make a custom service widgets as i have told before in your child theme to avoid you customized code lost.

    Thank you!

    #26296
    Chama
    Participant

    And the read more link? On my page the read more links to the homepage. I’ve made some tests/Coding yesterday and I’ve used the permalink() function.

    <div class="<?php echo $service_class; ?>">
    			<div class="service-item clearfix">
    				<a href="<?php the_permalink(); ?>">
    					<?php
    					if ( has_post_thumbnail() ) {
    						echo '<div class="service-icon">'.get_the_post_thumbnail( $post->ID, 'medium' ).'</div>';
    					}
    					?>
    				</a>
    				<h3 class="service-title">
    					<a href="<?php the_permalink(); ?>">
    						<?php echo $page_title; ?>
    					</a>
    				</h3>
    
    				<article>
    					<?php the_excerpt(); ?> //above this line permalink(); works fine, below it links to the page domain
    				</article>
    				<!-- .service-item 			-->
    					<?php if( !empty( $options[ 'post_excerpt_more_text' ] ) ) { ?>
    				<a href="<?php the_permalink(); ?>" class="more-link">
    					<?php echo $options[ 'post_excerpt_more_text' ]; ?>
    				</a>
    				<?php } ?>
    
    		</div>
    #26314

    Hi Chama,

    The service link is already linked to particular page. Could you once send your site Url too. You can also view in our demo site and the read more button is linked to particular pages.
    https://www.themehorse.com/preview/interface-pro/

    Thank you!

    #26315

    Hi Chama,

    The service link is already linked to particular page. Could you once send your site Url too. You can also view in our demo site and the read more button is linked to particular pages and is not linked to home page.
    https://www.themehorse.com/preview/interface-pro/

    Thank you!

    #26569
    Dean
    Participant

    I would like to be able to choose the hover background colour for the service icons and link the icons to their respective service pages. At the moment I have tried inserting CSS into the Custom CSS section of the theme, but this is being ignored. Surely this if a floor in the theme?

    Is there a simple way to choose the hover background colour and set the link for each?

    #26589

    Hi Dean,

    This feature is not available in our theme. It needs code customization and you need to hire a developer to fix it.
    To add link in service icon go to the theme folder -> inc ->widgets -> interface_widgets.php. Can you see this code on line no 329 to 333

    <?php 
     if ( has_post_thumbnail() ) {
     	echo'<div class="service-icon">'.get_the_post_thumbnail( $post->ID, 'icon' ).'</div>';						}
    ?>

    Replace above code with this below code

    <?php 
     						if ( has_post_thumbnail() ) {
     							echo'<div class="service-icon"><a href="'.get_permalink() .'">'.get_the_post_thumbnail( $post->ID, 'icon' ).'</a></div>';
     						}
     						?>
    

    Now you can have a link in services icon. Just make a custom service widgets as i have told before in your child theme to avoid you customized code lost.

    Thank you!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.