Marketpress not display custom taxonomies

in addition to the products of all taxonomies is normally displayed on the product page, but when viewing my taxonomy of goods displayed 404 error
when switched off Permalinks theme uses included as a standard template archive.php

can be used to redirect(rewrite)?

My code in gridmarket/function.php

function create_product_subcategory() {
//?????? ??????
register_taxonomy(
		'product_size_beads',
		'product',
				array(
						"hierarchical" => true,
						'label' => '?????? ??????',
						'singular_label' => '?????? ??????',
						'rewrite' => array('slug' => 'store/products/product_size_beads')
					)
		);
//????? ?????????
register_taxonomy(
		'product_beads_hole',
		'product',
				array(
						"hierarchical" => true,
						'label' => '?????????',
						'singular_label' => '?????????',
						'rewrite' => array('slug' => 'store/products/product_beads_hole')
				)
);

//????????????
register_taxonomy(
		'product_transparency',
		'product',
				array(
						"hierarchical" => true,
						'label' => '????????????',
						'singular_label' => '????????????',
						'rewrite' => array('slug' => 'store/products/product_transparency')
				)
);

//????????
register_taxonomy(
		'product_cover',
		'product',
				array(
						"hierarchical" => true,
						'label' => '????????',
						'singular_label' => '????????',
						'rewrite' => array('slug' => 'store/products/product_cover')
				)
);

//?????? ??????
register_taxonomy(
		'product_size_bead',
		'product',
				array(
						"hierarchical" => true,
						'label' => '?????? ??????',
						'singular_label' => '?????? ??????',
						'rewrite' => array('slug' => 'store/products/product_size_bead')
				)
);
//????????
register_taxonomy(
		'product_material',
		'product',
				array(
						"hierarchical" => true,
						'label' => '????????',
						'singular_label' => '????????',
						'rewrite' => array('slug' => 'store/products/product_material')
				)
);
//????
register_taxonomy(
		'product_color',
		'product',
				array(
						"hierarchical" => true,
						'label' => '????',
						'singular_label' => '????',
						'rewrite' => array('slug' => 'store/products/product_color')
				)
);
//?????
register_taxonomy(
		'product_form',
		'product',
				array(
						"hierarchical" => true,
						'label' => '?????',
						'singular_label' => '?????',
						'rewrite' => array('slug' => 'store/products/product_form')
				)
);
//??????
register_taxonomy(
		'product_size',
		'product',
				array(
						"hierarchical" => true,
						'label' => '??????',
						'singular_label' => '??????',
						'rewrite' => array('slug' => 'store/products/product_size')
				)
);
//???????
register_taxonomy(
		'product_pre_packing',
		'product',
				array(
						"hierarchical" => true,
						'label' => '???????',
						'singular_label' => '???????',
						'rewrite' => array('slug' => 'store/products/product_pre_packing')
				)
);
}
add_action ('init', 'create_product_subcategory', 0);
  • aecnu

    Greetings max_volkov,

    Welcome to WPMU DEV!

    I am sorry to report that you have completely lost me on what we are trying to accomplish on your WordPress installation and though at first I seemed to understand what you were trying to point out up until this point: when switched off Permalinks theme uses included as a standard template archive.php

    Please clarify what you are trying to do and the difficulties you are having trying to get it to work.

    Cheers, Joe

  • max_volkov
    //rewrie rules for product properties custom taxonomy
    function add_rewrite_rules_product_properties($rules) {
    	$new_rules = array();
    	//product properties
    	$new_rules['store/products/product_size_beads/([^/]+)/?$'] = 'index.php?product_size_beads=$matches[1]';
    	$new_rules['store/products/product_beads_hole/([^/]+)/?$'] = 'index.php?product_beads_hole=$matches[1]';
    	$new_rules['store/products/product_transparency/([^/]+)/?$'] = 'index.php?product_transparency=$matches[1]';
    	$new_rules['store/products/product_cover/([^/]+)/?$'] = 'index.php?product_cover=$matches[1]';
    	$new_rules['store/products/product_size_bead/([^/]+)/?$'] = 'index.php?product_size_bead=$matches[1]';
    	$new_rules['store/products/product_material/([^/]+)/?$'] = 'index.php?product_material=$matches[1]';
    	$new_rules['store/products/product_color/([^/]+)/?$'] = 'index.php?product_color=$matches[1]';
    	$new_rules['store/products/product_form/([^/]+)/?$'] = 'index.php?product_form=$matches[1]';
    	$new_rules['store/products/product_size/([^/]+)/?$'] = 'index.php?product_size=$matches[1]';
    	$new_rules['store/products/product_pre_packing/([^/]+)/?$'] = 'index.php?product_pre_packing=$matches[1]';
    	//$new_rules['store' . '/' . 'products' . '/' . 'properties' . '/page/?([0-9]{1,})/?$'] = 'index.php?pagename=product_list&paged=$matches[1]';
    
    	return array_merge($new_rules, $rules);
    }
    add_filter( 'rewrite_rules_array', 'add_rewrite_rules_product_properties' );

    and add

    //setup taxonomy if applicable
      if ($category) {
        $taxonomy_query = '&product_category=' . sanitize_title($category);
      } else if ($tag) {
        $taxonomy_query = '&product_tag=' . sanitize_title($tag);
      } else if ($wp_query->query_vars['taxonomy'] == 'product_category' || $wp_query->query_vars['taxonomy'] == 'product_tag'
      		|| $wp_query->query_vars['taxonomy'] == 'product_size_beads'
      		|| $wp_query->query_vars['taxonomy'] == 'product_beads_hole'
      		|| $wp_query->query_vars['taxonomy'] == 'product_transparency'
      		|| $wp_query->query_vars['taxonomy'] == 'product_cover'
      		|| $wp_query->query_vars['taxonomy'] == 'product_size_bead'
      		|| $wp_query->query_vars['taxonomy'] == 'product_material'
      		|| $wp_query->query_vars['taxonomy'] == 'product_color'
      		|| $wp_query->query_vars['taxonomy'] == 'product_form'
      		|| $wp_query->query_vars['taxonomy'] == 'product_size'
      		|| $wp_query->query_vars['taxonomy'] == 'product_pre_packing') {
        $taxonomy_query = '&' . $wp_query->query_vars['taxonomy'] . '=' . get_query_var($wp_query->query_vars['taxonomy']);
      }

    and modify marketpress plugin

    //load proper theme for product category or tag listings
        if ( isset( $wp_query->query_vars['taxonomy'] ) && ( $wp_query->query_vars['taxonomy'] == 'product_category' || $wp_query->query_vars['taxonomy'] == 'product_tag' || $wp_query->query_vars['taxonomy'] == 'product_size_beads'
      		|| $wp_query->query_vars['taxonomy'] == 'product_beads_hole'
      		|| $wp_query->query_vars['taxonomy'] == 'product_transparency'
      		|| $wp_query->query_vars['taxonomy'] == 'product_cover'
      		|| $wp_query->query_vars['taxonomy'] == 'product_size_bead'
      		|| $wp_query->query_vars['taxonomy'] == 'product_material'
      		|| $wp_query->query_vars['taxonomy'] == 'product_color'
      		|| $wp_query->query_vars['taxonomy'] == 'product_form'
      		|| $wp_query->query_vars['taxonomy'] == 'product_size'
      		|| $wp_query->query_vars['taxonomy'] == 'product_pre_packing') ) {
          $templates = array();

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.