Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Mikage

    (@mikage)

    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: https://mysite.com/events/

    Can you check rewrite slug settings?

    Thread Starter Mikage

    (@mikage)

    Hello,
    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.