Home Forums Theme support Create link from featured image link to portfolio page

This topic contains 5 replies, has 2 voices, and was last updated by  7Theme Support 6 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Hello. On my home page I have a carousel showing my portfolio pages, which for my site are countries.
    How do I add links to the featured images so that when clicked, they direct to their respective portfolio/country page?

    Right now it only works if the country name is clicked.

    The web site is: http://www.ilextravel.com

    I’m using WordPress.org and the theme Tripsters.

    Hi, without changes in the PHP code it is not possible. Do you know how to edit the PHP files? Then we can send you the code to change…

    Hello. Good to know there is a solution! I’ve never edited PHP files, but if you send me step-by-step instructions, I’m sure I can figure it out.
    Please send the code. Thank you!

    Ok, open the file “portfolio-entry.php” in the root of the theme folder, then go to line 13 and replace this:

    <div class="featured_image portfolio_shortcode_featured_image"><?php sl_featured_image(); ?></div>

    with this:

    <div class="featured_image portfolio_shortcode_featured_image"><a href="<?php echo get_permalink(); ?>"><?php sl_featured_image(); ?></a></div>

    Great. Thank you so much! I updated the line, and now the Featured Images link automatically to their pages! I thought I’d still have to go in and set each one, but this was so much easier. This is a big improvement. Thanks a million!

    You’re welcome!

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

You must be logged in to reply to this topic.