Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » multiple custom post types problem

  • Resolved Mikage


    I’ve added a second custom post types (the first was “Products” the second “Events”). I then created an event post.

    If i browse the Events posts, the products posts appear as well and i can’t see the event post i created.

Viewing 4 replies - 1 through 4 (of 4 total)
  • also, the problem arises when i check the “has_archive” option for the new custom post type

    Are you seeing both (or wrong) post types on frontend?
    like when visiting URL:

    Can you check rewrite slug settings?

    I actually solved the problem. It was caused by using this function:

    function namespace_add_custom_types( $query ) {
      if( is_category() || is_archive() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
    		$query->set( 'post_type', array('post', 'prodotti', 'eventi', 'slideshow', 'nav_menu_item'));
    	  return $query;

    Enclosing the IF function in if(!is_admin()) { } solved my problem.

    Thanks for your feedback.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘multiple custom post types problem’ is closed to new replies.