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

    Hi, I am using Enfold and I really like it.
    I would like to ask you if possible reverse the order of portfolio items in masonry portfolio grid.
    I explain better: I set the mansonry portfolio and when I open a project there are two navigation arrows on both side and If I click on right arrow I go to previous project and If I click on left arrow I go to next project. Is it possible to reverse the order so clicking on right I go to next project and clicking on left I go to previous project? I am using Post Types Order plugin.
    Here the link to the website: http://www.francogaffuri.com
    Thank you very much

    *** Currently, waiting for your reply, I temporarily deactivated the arrows using the following CSS: #top .avia-post-nav { display: none; }

    #1250569

    Hey argentinadelfina,

    Thank you for the inquiry.

    Yes, reversing the post navigation is possible. We could use this snippet or filter in the functions.php file to assign the value of the next arrow to the previous arrow and vice versa.

    add_filter( 'avia_post_nav_entries', 'avia_post_nav_entries_mod_reverse', 10, 2); 
    function avia_post_nav_entries_mod_reverse($entries, $settings)
    {
    	if($settings['type'] == 'portfolio')
    	{
    		$settings['same_category'] = true;
    
    		$entries['prev'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    		$entries['next'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    	}
    
        return $entries;
    }
    

    Best regards,
    Ismael

    #1250578

    Hi thank you for your reply.
    I pasted the filter and it works, but i need to show the next and previous project as in the portfolio order, currently it shows in the next and previos the same category.
    Thank you very much

    #1250828

    Hi,

    Thank you for the inquiry.

    What happens when you set the same_category parameter to false, or this line.

    $settings['same_category'] = true;
    

    Please try to set it to false.

    Best regards,
    Ismael

    #1250851

    Hi Ismael thank you very much for your reply.
    It works and is what I needed.
    Thank you

    #1250966

    Hi argentinadelfina,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

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