Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1276190

    I appreciate the “Overwrite Portfolio Link setting” option because it allows me to direct two different titles/featured images to the same portfolio page. Thanks for that ability. However, a problem arises when I then use the “next/previous” and it hits a page with an overwrite on it; it doesn’t lead to the new URL. Instead, it just shows a page with nothing on it but header and footer area.

    I’d like to either find a way to exclude these entirely from the next/previous links, or make the page link to that overwrite setting the same way the featured image does. Having an empty page…clearly not what anyone would want. Is there a way to add a category or tag and then tell the theme to exclude those from the next/previous?

    An example for you: https://realfreshcreative.com/portfolio-item/jul-designs/. Click on next and you’ll see an item that should lead to that same page again, because it has an overwrite. I’d rather these not appear at all, even if I have to exclude them one at a time in CSS, but having them lead to nothing ruins the usability of the overwrite entirely.

    Thanks.

    • This topic was modified 3 years, 10 months ago by kaylesimon.
    #1276817

    Hey kaylesimon,

    Thank you for the inquiry.

    There is a way to set the post navigation to display only items that belong in the same category using the avia_post_nav_entries filter. Just make sure that the items that you want to be excluded are not in the same category as the others.

    
    function avia_post_nav_entries_mod($entries, $settings)
    {
    	if($settings['type'] == 'portfolio')
    	{
    		$settings['same_category'] = true;
    	}
    
        return $entries;
    }
    add_filter( 'avia_post_nav_entries', 'avia_post_nav_entries_mod', 10, 2); 
    

    Best regards,
    Ismael

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