Theme Support Forum
Support Forum for Free and Premium Themes. Premium Theme Forums are Private! Please log in first to see the Premium forums
-
#12262
On April 24, 2012 at 10:18 am
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
On April 24, 2012 at 10:55 am
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
On April 24, 2012 at 10:57 am
copy the whole code to pastebin.com and share the link here.
#16302
On April 24, 2012 at 11:11 am
#16303
On April 24, 2012 at 11:14 am
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
On April 24, 2012 at 11:19 am
thank that works great but somehow the pic has got cut please see attached file
[attachment=2842,177]
#16305
On April 24, 2012 at 11:22 am
whats your site address? I have to examine this issue.
#16306
On April 24, 2012 at 11:24 am
#16307
On April 24, 2012 at 11:27 am
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
On April 24, 2012 at 11:37 am
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
On April 24, 2012 at 11:45 am
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
On April 24, 2012 at 11:58 am
thats great thanks for that.
Hello! this is Towfiq, a passionate web developer from Bangladesh, building website templates for almost 4 years and sharing them with the world. Most of my designing/ programming skills are self taught. Providing free Wordpress themes to wordpress enthusiasts is another one of my passions.
When I am not building templates, I listen to music, read books, paint and travel.
x