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

    Hi there,

    Is there any way for me to be able to selectively remove the default links to the titles in the portfolio section? For example, if you go to http://www.bht-design.org.uk/portfolio I need to unlink the ‘Threshold Logo’ header, as it leads to an empty post. I just need that entry to have the picture linking to the lightbox as it does now.

    Many thanks.

    #51701

    Hey,

    basically you can use post meta to do this. In template_portfolio.php replace:

    echo "<h3 class='name_sort'><a href='".get_permalink()."' title='".get_the_title()."'>".get_the_title()."</a></h3>";

    with:

    if (! get_post_meta($post->ID, 'notitle', true)){
    echo "<h3 class='name_sort'><a href='".get_permalink()."' title='".get_the_title()."'>".get_the_title()."</a></h3>";
    }

    and set a “notitle” custom value for items without headline. This modification may break the sortable portfolio feature.

    #51702

    You’re correct – as the code takes away the title altogether it is ignored at sort stage; it doesn’t exactly break the whole thing, but having no title at all takes away important information.

    However, I was looking to still have the title but break the link. If it’s not possible to have a title with no link, is there a way to set a custom value where the title links back to the portfolio page, effectively disabling it?

    Thanks.

    #51703

    You can try to use following code instead:

    if (get_post_meta($post->ID, 'nolink', true)){
    echo "<h3 class='name_sort'>".get_the_title()."</h3>";
    }else{
    echo "<h3 class='name_sort'><a href='".get_permalink()."' title='".get_the_title()."'>".get_the_title()."</a></h3>";
    }

    and set a ‘nolink’ value for portfolio entries without a title link.

    #51704

    Absolutely perfect. Many thanks for the excellent support as usual. :-)

    #51705

    Glad that I could help you :)

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

The topic ‘Avisio Portfolio Title Links’ is closed to new replies.