Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1116695

    Hi all –

    I’d like the titles of my Portfolio Grid items to have the same link that the images do.

    Can this be achieved?

    Thanks!
    D

    #1116826

    Hey sdigit,

    Please refer to the following:

    Best regards,
    Jordan Shannon

    #1117078

    Hi Jordan,

    Thanks for this. I added the final block of code from that post to my child theme’s functions.php:

    function my_custom_title_link( $title_link, $entry )
    {
    	if( ! empty( $title_link ) )
    	{
    		return $title_link;
    	}
    	
    	$title_link  = get_permalink( $entry->ID );
    	return $title_link;
    }
    
    add_filter( 'avf_portfolio_title_link', 'my_custom_title_link', 10, 2 );

    But still the portfolio grid titles aren’t links.

    Am I missing something?

    #1117470

    Hi,

    Thank you for the update.

    The title of the portfolio items are actually disabled. Are you using the excerpt as the title? You have to set the element’s Excerpt settings to “Title and Excerpt”.

    Best regards,
    Ismael

    #1117624

    Thanks Ismael.

    Sorry – I remember now that we’d used the excerpt as title in order to have shorter titles in the grid.

    Is there any way to have the excerpt linked the way the titles normally are?

    Or to have custom titles in the Portfolio Grid (different than the Portfolio Item’s actual title)?

    :)
    D

    #1117996

    Hi,

    I see. This is possible, but you have use a script. Try this snippet in the functions.php file.

    function ava_custom_script_grid_link(){
    ?>
    <script>
    (function($) {
        $('.grid-content').on('click', function() {
           var image = $(this).prev('.grid-image');
            window.location.href = image.attr('href'); 
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'ava_custom_script_grid_link');

    Best regards,
    Ismael

    #1118105

    That did it!

    Thank you Ismael!!

    :)
    D

    #1118316

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Portfolio Grid – Link Titles/Captions (in addition to images)’ is closed to new replies.