Click on image in featured slider to go to post
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Hi Guys,
I’ve made a few changes to the featured slider on my site to only display the images rather than the title and excerpt.
Can you advise how I can make the image in the slider clickable rather than keeping the ‘Continue reading’?
Please also note, I haven’t yet upgraded from 1.3.1, as I need to do some testing as the website has a few plugins 🙂
Cheers
Jami
I just did something like this for one of my clients the other day.
Two things you need to do. First, add this code to your child theme’s functions.php file:
<?php
/**
* Make slider posts clickable
*/
function graphene_clickable_slider(){
?>
<a href="<?php global $post; echo get_permalink( $post->ID ); ?>" class="slider-link"></a>
<?php
}
add_action( 'graphene_before_sliderpost', 'graphene_clickable_slider' );
?>
Then, add this into your child theme’s style.css file or the Custom CSS option:
.slider-link {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 10;
display: block;
}
`
Viewing 3 posts - 1 through 3 (of 3 total)
This free Support Forum relies on contributions from our support staffs and fellow Graphene themes users. While we endeavour to provide adequate and timely support, due to its voluntary nature responses are not guaranteed and may be delayed.
If you require urgent assistance, you may like to consider our Priority Support option.
Made with by Graphene Themes.