Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #330566

    GOAL:
    To create a page with a sortable portfolio grid with video portfolio items that open in a lightbox on the same page.

    ISSUE:
    When adding Portfolio Items / Overwrite Portfolio Link setting / Define Custom Link / Link portfolio item to external URL / it duplicates the Previous and Next lightbox links. If the user clicks on the Next button when viewing portfolio item 01 in a lightbox, it goes to portfolio item 01 again, instead of portfolio item 02.

    EXPECTED RESULT:
    When viewing page with the portfolio grid and video lightbox portfolio item 01, clicking the next button goes to video lightbox portfolio item 02.

    If in the page you set the Link Handling to ‘Display the big image in a lightbox’ this solves the issue for images, but when leveraging the Define Custom Link / Link portfolio item to external URL, i.e. YouTube video, the ‘Display the big image in a lightbox’ persists with the Big Image, not the Overwrite Portfolio Link Setting / Define Custom Link

    • This topic was modified 10 years, 2 months ago by bowmandesign.
    #331375

    Hi,

    Can you please create us a WordPress administrator account? post it here as a private reply.

    Regards,
    Josue

    #332097
    This reply has been marked as private.
    #332132

    Hi!

    Yes, that seems to be an unexpected result, the problem is that both the image and the title are linking to the same link, therefore creating a double lightbox.

    Here’s a fix, try adding this to theme / child theme functions.php:

    function change_portfolio_title_link($title_link, $entry) {
    	$title_link = $entry->permalink;
    	return $title_link;
    }
    add_filter('avf_portfolio_title_link', 'change_portfolio_title_link', 10, 2);

    That will force the portfolio title to always link to the permalink wether or not a custom link is defined.

    Regards,
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.