Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

gian-ava on "[Plugin: Polylang] Taxonomy & custom post types problems"

$
0
0

Chouby, I updated to 1.2.4, but all the problems are still there:

1) No display for Shop/Products custom post type and taxonomy
2) No "current" class for Videos Categories Taxonomy
3) Displaying the word "English" instead of "Taxonomy Term Name"

The custom taxonomy is from my self-mada theme:

Here's the code:

// Custom Post Types
	// --------------------------------------------------------------------
	add_action( 'init', 'create_my_post_types' );

	function create_my_post_types() {

		// Videos
		register_post_type( 'mnd_videos',
			array(
				'labels' => array(
					'name' => __( 'Videos' ),
					'singular_name' => __( 'Video' )
				),
				'rewrite' => array('slug' => 'videos', 'with_front'=> true),
				'public' => true,
				'supports' => array('title', 'editor', 'thumbnail', 'comments', 'custom-fields'),
				'register_meta_box_cb' => 'add_videos_metaboxes',
				'menu_position' => 5

			)
		);
		// Shop
		register_post_type( 'mnd_products',
			array(
				'labels' => array(
					'name' => __( 'Products' ),
					'singular_name' => __( 'Product' )
				),
				'rewrite' => array('slug' => 'shop', 'with_front'=> true),
				'public' => true,
				'supports' => array('title', 'editor', 'thumbnail', 'comments', 'custom-fields'),
				'register_meta_box_cb' => 'add_products_metaboxes',
				'menu_position' => 6

			)
		);

// Custom Taxonomies
	// --------------------------------------------------------------------
	function create_taxonomies() {

		// Video Categories (Channels) for "Videos" Custom Post Type
		register_taxonomy('videos-categories', 'mnd_videos', array(
			'hierarchical' => false,
			'label' => 'Channels',
			'query_var' => true,
			'show_ui' => true,
			'show_admin_column' => true,

			// Control the slugs used for this taxonomy
			'rewrite' => true,
			'rewrite' => array(
				'slug' => 'channels',
				'with_front'=> false
			)

		));

		// Shop Categories for "Products" Custom Post Type
		register_taxonomy('shop-categories', 'mnd_products', array(
			'hierarchical' => false,
			'label' => 'Shop Categories','
			query_var' => true,
			'show_ui' => true,
			'show_admin_column' => true,

			// Control the slugs used for this taxonomy
			'rewrite' => true,
			'rewrite' => array(
				'slug' => 'products',
				'with_front'=> false
			)

		));

Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>