Title: herooutoftime's Replies | WordPress.org

---

# herooutoftime

  [  ](https://wordpress.org/support/users/herooutoftime/)

 *   [Profile](https://wordpress.org/support/users/herooutoftime/)
 *   [Topics Started](https://wordpress.org/support/users/herooutoftime/topics/)
 *   [Replies Created](https://wordpress.org/support/users/herooutoftime/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/herooutoftime/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/herooutoftime/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/herooutoftime/engagements/)
 *   [Favorites](https://wordpress.org/support/users/herooutoftime/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ultimate Posts Widget] Category within custom post type?](https://wordpress.org/support/topic/category-within-custom-post-type/)
 *  [herooutoftime](https://wordpress.org/support/users/herooutoftime/)
 * (@herooutoftime)
 * [11 years ago](https://wordpress.org/support/topic/category-within-custom-post-type/#post-5097065)
 * 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);
       }
       ?>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Post Types Order] Plugin overwrite my portfolio order!](https://wordpress.org/support/topic/plugin-overwrite-my-portfolio-order/)
 *  [herooutoftime](https://wordpress.org/support/users/herooutoftime/)
 * (@herooutoftime)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/plugin-overwrite-my-portfolio-order/#post-4929638)
 * Hi [@jespersmukkehansen](https://wordpress.org/support/users/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)