Theme Support Forum

Support Forum for Free and Premium Themes. Premium Theme Forums are Private! Please log in first to see the Premium forums

Viewing 12 posts - 1 through 12 (of 12 total)

easyslider

Home Forums Misc. General Forums easyslider

  • #12262

    vashani

    subscriber

    Hi there,

    just tried to make the image in the slider a clickable link, the same as the text in the slider

    by

    going into easyslider.php.

    but seem to have made some error.

    I replaced<?php the_post_thumbnail(); ?>

    and replace it withID, ‘slide_link’, TRUE); ?>”><?php the_post_thumbnail(); ?>

    as written by in one of the forum topic but have totally got it wrong and now get this error when I click on the site:

    Parse error: syntax error, unexpected ‘=’ in /home/tjsconz/public_html/wp-content/themes/Triton/easyslider.php on line 10

    please help,

    thanks in advance

    #16300

    vashani

    subscriber

    tried playing with it and this is how finally how it it comes up,

    sorry but I am totally new at website designing, so please bear with me, thanks

    #16301

    Towfiq I.

    administrator

    copy the whole code to pastebin.com and share the link here.

    #16302

    vashani

    subscriber
    #16303

    Towfiq I.

    administrator

    Replace this line:

    <?php the_post_thumbnail(); ?>

    with:

    <a href="<?php get_post_meta($post->ID, 'slide_link', TRUE); ?>"><?php the_post_thumbnail(); ?></a>

    #16304

    vashani

    subscriber

    thank that works great but somehow the pic has got cut please see attached file

    [attachment=2842,177]

    #16305

    Towfiq I.

    administrator

    whats your site address? I have to examine this issue.

    #16306

    vashani

    subscriber
    #16307

    Towfiq I.

    administrator

    okay. remove everything from easyslider.php and paste this:

    <?php $option =  get_option('trt_options'); ?>
    <div id="slider" class="easyslider">
    <ul>
    <?php $loop = new WP_Query( array( 'post_type' => 'slider', 'posts_per_page' => $option['trt_num_sld'] ) ); ?>
    <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
    <li>
    <div class="slider-content">
    <?php the_title( '<h2 class="entry-title"><a href="' . get_post_meta($post->ID, 'slide_link', TRUE) . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>' ); ?>
    <a href="<?php echo get_post_meta($post->ID, 'slide_link', TRUE); ?>"><?php the_excerpt(); ?></a>
    </div>
    <a href="<?php echo get_post_meta($post->ID, 'slide_link', TRUE); ?>"><?php the_post_thumbnail(); ?></a>
    </li>
    <?php endwhile; ?>
    </ul>
    </div>

    #16308

    vashani

    subscriber

    thats great its fixed that issue and also the pic comes up as a link but only part or the pic and not the whole. i mean shouldnt the whole pic be a link and not just a part on the pic. sorry for sound so vague but what i am asking is that no matter where the mouse is on the slider pic it should be treated as a link … is that possible?

    thanks again for your patience. you are truely a legend

    #16309

    Towfiq I.

    administrator

    its happening because the slider title is wrapped around with a box called “slider_content” and it cannot be made clickable. you can reduce the size of it by Adding these lines to stylesheet:

    .slider-content{width:350px!important; height:50px!important;}

    #16310

    vashani

    subscriber

    thats great thanks for that.