Grow your CSS skills. Land your dream job.

WP Creating Clickable Images on Gallery Slider

  • # February 13, 2013 at 2:25 pm

    Hello, we have a homepage slider for revolving images. We wanted to feature certain projects on a rotating schedule in the number 2 and number 3 slot but cannot figure out how to make the image clickable with a URL that redirects to the actual portfolio page for that particular project. I am a PHP novice so I am not sure where to even insert the code. Any help would be much appreciated.[http://www.buzzbombcreative.com](http://buzzbombcreative.com “Buzzbomb Creative”)

    # February 17, 2013 at 3:51 pm

    I’m guessing you got this sorted as I can’t see a slider anywhere on the site (correct me if I’m wrong) but I’m going round the site trying to add a little advice to old posts that haven’t had any discussion. So…

    Most of the time when parts of individual pieces of content are outputted in WordPress, this is done through something called “the loop”. This involves spitting out the same types of material for each entry that fits within the criteria specified parameters. The values change according to the particular post. Bearing this in mind, it is likely that you are using a function to get the images. Getting the link for the more detailed portfolio entry can be achieved through the `the_permalink` function.

    Therefore, you code might like something like:

    < ?php if(have_posts()): while(have_posts()) the_post ?>
    // OBJECTS TO OUTPUT FOR EACH POST
    “>
    < ?php get_post_meta( $post->ID, ‘thumbnail’, false) // how you could be getting the image itself ?>

    < ?php endwhile; endif ?>

    # February 18, 2013 at 5:44 pm

    Hey there, thanks for responding to my post. I just reactivated the slider function on the home page. Please take a look if you have a moment and let me know your thoughts. Thanks!

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".