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

    HI
    I’d like to reverse the order of the portfolio items in the latest portfolio widget.
    I found this thread: https://kriesi.at/support/topic/enfold-latest-portfolio-widget-order-reverse/ but I think the information is outdated as I couldn’t find the class-framework-widgets.php file. Can you help me with this?
    thanks
    Nancy

    #1433401

    Hey Munford,

    Thank you for the inquiry.

    You’ll find the widget template in the widgets/widget-classes/class-avia-newsbox.php, and the query around line 163:

    {
    $new_query = array(
    'posts_per_page'	=> $count,
    'tax_query'			=> array(
    		array(
    			'taxonomy'	=> $this->avia_term,
    			'field'		=> 'id',
    			'terms'		=> explode( ',', $cat ),
    			'operator'	=> 'IN'
    		)
    	)
    );
    }
    

    Best regards,
    Ismael

    #1433420

    thanks Ismael –
    I found the code – what should I replace that with?
    also can that be put in my child theme?

    • This reply was modified 10 months, 2 weeks ago by Munford.
    #1433446

    Hi,

    Thank you for the update.

    You can add the order and orderby parameters to the query.

    {
    $new_query = array(
    'posts_per_page'	=> $count,
    'orderby' => 'date',
    'order' => 'ASC',
    'tax_query'			=> array(
    		array(
    			'taxonomy'	=> $this->avia_term,
    			'field'		=> 'id',
    			'terms'		=> explode( ',', $cat ),
    			'operator'	=> 'IN'
    		)
    	)
    );
    }
    

    Unfortunately, it’s not possible to override the file in the child theme.

    Best regards,
    Ismael

    #1434068
    This reply has been marked as private.
    #1434146

    Hi,

    You’re welcome! Please don’t hesitate to open another thread if you have more questions about the theme.

    Have a nice day.

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘reverse order latest portfolio widget’ is closed to new replies.