Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14496

    Hi,

    Rather than having my portfolio images open in a lightbox, I’d like them to link to link to the post they are about.

    I’ve found solutions for this on your other themes, but not on Levitation.

    Thanks in advance!

    Ari

    #83674

    Hi Ari,

    In your template_portfolio.php file search for:

    <?php
    echo '<a href="'.$portfolio_image.'" rel="lightbox[portfolio]"><img class="aligncenter" src="'.$portfolio_image_small.'" alt="" /></a>';

    ?>

    and replace it with:

    <a href="<?php echo get_permalink() ?>"><?php echo '<img class="aligncenter" src="'.$portfolio_image_small.'" alt="" />'?></a>

    Regards,

    Devin

    #83675

    Hi,

    Thanks for the reply. I did what you said, and uploaded the new file to replace the old one, but now when I go to that page I get the following message.

    Parse error: syntax error, unexpected ‘<‘ in /data/31/0/152/154/315969/user/321447/htdocs/wordpress/wp-content/themes/levitation/template_portfolio.php on line 45

    Here is the link to the page if you need it…

    http://digitaleclipse.tv/wordpress/portfolio/

    Maybe it is just a simple typo or something.

    Thanks!

    #83676

    Hey grunze,

    Sorry about that! You’ll also need remove the php tags before and after that line. So you had:

    <?php
    echo '<a href="'.$portfolio_image.'" rel="lightbox[portfolio]"><img class="aligncenter" src="'.$portfolio_image_small.'" alt="" /></a>';

    ?>

    It should now just be:

    <a href="<?php echo get_permalink() ?>"><?php echo '<img class="aligncenter" src="'.$portfolio_image_small.'" alt="" />'?></a>

    I also corrected the code above in case anyone else follows along later :)

    Regards,

    Devin

    #83677

    Beauty! Works like a charm!

    Thanks!!

    #83678

    Great! Glad its working for you now :)

    Regards,

    Devin

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

The topic ‘Make portfolio images as links instead of lightbox’ is closed to new replies.