wordpress/wp-content/themes/basic/themify/themify-wp-filters.php
/**
 * Change order and orderby parameters in the index loop, per options in Themify > Settings > Default Layouts
 *
 * @since 3.1.2
 */
Change order and orderby parameters in the index loop, per options in Themify > Settings > Default Layouts
@since 3.1.2
Change order and orderby parameters in the index loop per options in Themify > Settings > Default Layouts @since 3 . 1 . 2
function themify_archive_post_order( $query ) {
	if ( $query->is_main_query() && ( $query->is_home() || $query->is_category() || $query->is_tag() ) ) {
		remove_action( 'pre_get_posts', 'themify_archive_post_order', 999 );
		$query->set( 'order', themify_get( 'setting-index_order','date',true ) );
		$orderBy=themify_get( 'setting-index_orderby' ,'',true);
		$query->set( 'orderby', $orderBy);
		if (($orderBy==='meta_value' || $orderBy==='meta_value_num')) {
			$metaKey=themify_get( 'setting-index_meta_key',false,true );
			if($metaKey){
				$query->set( 'meta_key', $metaKey );
			}
		}
	}
}
function themify_archive_post_order ( $ query ) { if ( $ query -> is_main_query ( ) && ( $ query -> is_home ( ) || $ query -> is_category ( ) || $ query -> is_tag ( ) ) ) { remove_action ( 'pre_get_posts' , 'themify_archive_post_order' , 999 ) ; $ query -> set ( 'order' , themify_get ( 'setting-index_order' , 'date' , true ) ) ; $ orderBy = themify_get ( 'setting-index_orderby' , '' , true ) ; $ query -> set ( 'orderby' , $ orderBy ) ; if ( ( $ orderBy === 'meta_value' || $ orderBy === 'meta_value_num' ) ) { $ metaKey = themify_get ( 'setting-index_meta_key' , false , true ) ; if ( $ metaKey ) { $ query -> set ( 'meta_key' , $ metaKey ) ; } } } }
Change order and orderby parameters in the index loop, per options in Themify > Settings > Default Layouts
 @since 3.1.2
Change order and orderby parameters in the index loop per options in Themify > Settings > Default Layouts @since 3 . 1 . 2