Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #390736

    Hi,
    I’ve set up a new website containing some projects in a portfolio. The next/previous portfolio-item buttons are working fine, except for the last portfolio-item. The next button links to the previous one. Is there a way to link the very first portfolio item instead?

    Thanks!

    #391468

    Hey mediabelgium!

    That’s pretty weird. By default it should be going by the order in your dashboard. Can you send us a WordPress login so we can take a closer look?

    Also be sure to update Enfold to the latest version, 3.0.8, and deactivate all plugins while testing.

    Cheers!
    Elliott

    #392093
    This reply has been marked as private.
    #392511

    Hey!

    Please add this on functions.php:

    add_filter('avia_post_nav_entries', 'avia_apply_custom_sort_order_to_post_nav', 10, 2);
    function avia_apply_custom_sort_order_to_post_nav($entries, $settings)
    {
        $temp_prev = $entries['prev'];
        $temp_next = $entries['next'];
        $entries['prev'] = $entries['next'] = "";
        if(!empty($temp_prev)) $entries['next'] = $temp_prev;
        if(!empty($temp_next)) $entries['prev'] = $temp_next;
    	$first = get_post('130', OBJECT);
    	if(empty($temp_prev)) $entries['next'] = $first;
        return $entries;
    }

    Change the get_post id to the id of the first entry of your portfolio (Group KS).

    Cheers!
    Ismael

    #392984

    Hi,

    Where can I find the id of a portfolio item? I’ve tried to replace the get_post code by “get_post('3472', OBJECT);”, but this doesn’t solve the problem. Most likely I’m doing something wrong here :-)

    #393491

    Hey!

    Chose to edit the item in question, then, in your url, you will get something like this: domain.xx/wp-admin/post.php?post=1&action=edit, 1 is the id.

    Regards,
    Rikard

    #393610

    Hi,

    Thanks! Worked like a charm :-)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Portfolio navigation’ is closed to new replies.