Jump to content
Sign in to follow this  
gavred

Featured Slider - Link to featured media without text overlay.

Recommended Posts

gavred

Hi Guys, I'm not sure if this is an easy one or not, but I'm wondering if its possible to make the feature slide itself a link rather than just the overlay text as the link. The site is www.digitalacademy.ie Its doesn't seem to be possible - but where there's a will there's a way? Cheers, Gavin.

Share this post


Link to post
Share on other sites
gavred

I wasn't able to put in the full section of code there - I'm not quite sure how to go about including code with a href in it...

Share this post


Link to post
Share on other sites
gavred

Hi Catrina, I was just hoping to learn how to add link to featured media without text overlay. Adam gave me a link above that tries to show how this can be achieved; but unfortunately the user who figured it out had the same problem I had with the back ticks (`). (Thanks for the tip!) and then simply signs off by saying "Nevermind I figured it out." Tragically, I haven't had the same luck in figuring it out. If you have any idea what I might add to fill in the missing code that is supposed to go on line 321 of section.features.php to turn a featured image into a clickable one - I would be most grateful. Thanks a million! Gavin.

Share this post


Link to post
Share on other sites
Kate

Hey Gavin, Didn't look at the line, but shouldn't you just be able to add anchor tags around it to make it a link?

Share this post


Link to post
Share on other sites
gavred

Hi Kate, Sounds like a great suggestion but I can't add the href from the upload box - as all that displays is the link. How can I get at the code to add it? Thanks!

Share this post


Link to post
Share on other sites
cmunns

Gavin when you gave the code a crack did you get errors, what was the result? You probably just missed a thing or two, code can be very nit-picky on semi-colons, brackets, etc.

Share this post


Link to post
Share on other sites
gavred

Hi Adam, The code I tried was the following on line 321 of section.features.php; `` The result was that most of the images didn't display correctly and that the link certainly didn't work. If you could tell me where I went wrong that would be a massive help. I've been trying to figure this one out for a while now. Thanks.

Share this post


Link to post
Share on other sites
cmunns

Well did you add the closing `` tag. You have to tell the code where to end the link otherwise it will break a lot of stuff as the HTML is not "closed" You also don't need the backslash there unless I'm not seeing the code correctly. Did you use backticks to wrap the code? I'll need to see it exactly as you have it, even a screenshot maybe so I can see what went wrong?

Share this post


Link to post
Share on other sites
gavred

Hi Adam, Thanks for your reply - followed your advice on the closing tag. Bit of a school boy error that one all right. This is what I have. `<div class="dcol-pad"> <?php pagelines_register_hook( 'pagelines_feature_media_top', $this->id ); // Hook ?> <?php if(get_post_meta($post->ID, 'feature-media-image', true)):?> <div class="media-frame"> <a href="<?php echo get_post_meta($post->ID, 'feature-link-url', true);?>"ID, 'feature-media-image', true);?></a> </div>` The result is that the photos disappear. Thanks for the help with this. I appreciate it.

Share this post


Link to post
Share on other sites
catrina

Try this: `

<?php pagelines_register_hook( 'pagelines_feature_media_top', $this->id ); // Hook ?> <?php if(get_post_meta($post->ID, 'feature-media-image', true)):?>
`

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
gavred

Awesome! That worked perfectly - Thanks Catrina!

Share this post


Link to post
Share on other sites
tlafortune24

I am having some difficulty following this thread, could anyone summarize all required steps to make the feature images a link? Thanks.

Share this post


Link to post
Share on other sites
malcfinch

on my line 321 it shows... ?> Which bit of code do I replace ? cheers malc www.imdi.co.uk

Share this post


Link to post
Share on other sites
gavred

Share this post


Link to post
Share on other sites
gavred

Sorry I should then obviously say that the file needs to be saved and re-uploaded with your changes. It should replace the existing section.features.php. Also, a good tip is download a fresh copy of the file from the pagelines members area, so that if the changes dont work, you can simply replace the file with a fresh copy, and your site will work as before.

Share this post


Link to post
Share on other sites
malcfinch

thanks very much I'll try that. cheers malc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×