Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • herooutoftime

    (@herooutoftime)

    I managed this by adding a filter as mentioned in the docs.

    <?php
    add_filter('upw_wp_query_args', 'upw_query', 10, 3);
    
    function upw_query($args, $instance, $base) {
    
    	$arguments = array();
    
    	switch ($instance['template_custom']) {
    		case 'footer/media':
    			$arguments = array(
    				'tax_query' => array(
    					array(
    						'taxonomy' => 'partner-type',
    						'field'    => 'slug',
    						'terms'    => 'media',
    					),
    				),
    			);
    			break;
    		case 'footer/partner':
    			$arguments = array(
    				'tax_query' => array(
    					array(
    						'taxonomy' => 'partner-type',
    						'field'    => 'slug',
    						'terms'    => array('media', 'featured'),
    						'operator' => 'NOT IN',
    					),
    				),
    			);
    			break;
    		default:
    			# code...
    			break;
    	}
    	return array_merge($args, $arguments);
    }
    ?>

    Hi @jespersmukkehansen,

    if you’re still dealing with this issue, there’s an easy solution.
    Find the file post-types-order.php in the plugins folder and add your custom post-type around line 84.

    In my case the post-type was project_media, just replace this with your post-type.

    if (isset($query->query_vars['post_type']) && ((is_array($query->query_vars['post_type']) && in_array("project_media", $query->query_vars['post_type'])) || ($query->query_vars['post_type'] == "project_media")))
               return $orderBy;

    Hope it helps.

Viewing 2 replies - 1 through 2 (of 2 total)