• Resolved severinroos

    (@severinroos)


    i use Oria with carousel, its nice that my latest posts showed up in the carousel with the post image.

    The Title in front of the picture is linked to the post, how can i link also the picture? I want that the user can click on the picture in the carousel and the post opens.

    br

Viewing 2 replies - 1 through 2 (of 2 total)
  • you need to modify the code in the wp-content/themes/oria/inc/slider.php from line 49:

    <div class="slide">
    							<?php if ( has_post_thumbnail() ) : ?>
    								<?php the_post_thumbnail( 'oria-carousel' ); ?>
    							<?php else : ?>
    								<?php echo '<img src="' . get_stylesheet_directory_uri() . '/images/placeholder.png"/>'; ?>
    							<?php endif; ?>
    							<?php the_title( sprintf( '<h3 class="slide-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h3>' ); ?>
    						</div>

    to NEW CODE

    <div class="slide">
    							<?php
    							# hack by Trilibies
    							the_title( sprintf( '<h3 class="slide-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</h3>' ); ?>
    							<?php if ( has_post_thumbnail() ) : ?>
    								<?php the_post_thumbnail( 'oria-carousel' ); ?>
    							<?php else : ?>
    								<?php echo '<img src="' . get_stylesheet_directory_uri() . '/images/placeholder.png"/>'; ?>
    							<?php endif; ?>
    
    						</a></div>

    Note that it messes up the layout, so CSS may need to be modded, not reached that part yet ??

    Thread Starter severinroos

    (@severinroos)

    Thank you! It worked well ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘carousel link on image’ is closed to new replies.