-
AuthorPosts
-
April 2, 2017 at 10:56 pm #770765
Hey team
I found that the featured image slider is an ideal addition for my site. I can easily have my posts naturally loop into the slider feed in a timely manner, allowing me to schedule them in advance. The images I use for the banner are text rich and the title, read more, excerpt, are obstructive.
Is there a way that I can make 2 changes?
1) Remove the title altogether?
2) Make the images clickable and automatically link to the post from which they are drawn? (Make the title click functionality apply to the image).Thanks for your help
CheersApril 2, 2017 at 10:59 pm #770767The slider is on a home page I am developing here:
April 3, 2017 at 6:50 am #770898Hi,
Yes, but I suggest you use a child theme: http://kriesi.at/documentation/enfold/using-a-child-theme/ then replace the image slider functionality by overriding it: http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/ the file you should modify is slideshow_feature_image.php, copy it from enfold>config-templatebuilder>avia-shortcodes and paste on the shortcodes folder of your child theme then find this php code (line 546):
$caption .= ' <h2 class="avia-caption-title"><a href="'.$link.'">'.$title.'</a></h2>';
replace it with:
//$caption .= ' <h2 class="avia-caption-title"><a href="'.$link.'">'.$title.'</a></h2>';
then on line 576-578:
$html .= "<li {$slide_data} class='slide-{$counter} {$slide_class} slide-id-".$slide->ID."'>"; $html .= $caption; $html .= "</li>";
replace this code with:
$html .= "<a href=".get_permalink()."><li {$slide_data} class='slide-{$counter} {$slide_class} slide-id-".$slide->ID."'>"; $html .= $caption; $html .= "</a></li>";
Hope this helps :)
Best regards,
NikkoApril 3, 2017 at 7:44 am #770915Hey Nikko
We are making progess.
The title is gone!
The image is clickable!Now, can we make it link to the associated post? It currently returns to the home-page. :(
Thanks for the awesome feedback in your answer. Your site is easy to convert to a child theme
April 3, 2017 at 10:01 am #770991Hi,
You’re welcome. Try to change this code I gave:
$html .= "<a href=".get_permalink()."><li {$slide_data} class='slide-{$counter} {$slide_class} slide-id-".$slide->ID."'>";
to this one:
$html .= "<a href=".$link."><li {$slide_data} class='slide-{$counter} {$slide_class} slide-id-".$slide->ID."'>";
Hope this helps :)
Best regards,
NikkoApril 3, 2017 at 4:34 pm #771216That is it! Thank you so much Nikko!
April 3, 2017 at 8:13 pm #771300Hey!
Happy we can help!
Please feel free to let us know if there is anything else we can do for you!Thanks a lot
Cheers!
Basilis -
AuthorPosts
- The topic ‘Featured Image Slider: Remove Title, Make Image Link to Post’ is closed to new replies.