• How to properly use the Multiple taxonomies. So that you can sort both by category and my own taxonomie.

    <p>$term_slug	=	get_queried_object()->slug;</p>
    <p>		if($term_slug=true){<br />
    		$args = array(<br />
    			'post_type'=> 'wpcproduct',<br />
    			'order'     => 'ASC',<br />
    			'orderby'   => 'menu_order',<br />
    			'posts_per_page'	=> $per_page,<br />
    			'paged'	=> $paged,<br />
    			'tax_query' => array(<br />
    				array(<br />
    					'taxonomy' => 'wpccategories',<br />
    					'field' => 'slug',<br />
    					'terms' => get_queried_object()->slug<br />
    					)<br />
    				));</p>
    <p>		$args = array(<br />
    			'post_type'=> 'wpcproduct',<br />
    			'order'     => 'ASC',<br />
    			'orderby'   => 'menu_order',<br />
    			'posts_per_page'	=> $per_page,<br />
    			'paged'	=> $paged,<br />
    			'tax_query' => array(<br />
    				array(<br />
    					'taxonomy' => 'marka',<br />
    					'field' => 'slug',<br />
    					'terms' => get_queried_object()->slug<br />
    					)<br />
    				));</p>
    <p>		}else{<br />
    			$args = array(<br />
    			'post_type'=> 'wpcproduct',<br />
    			'order'     => 'ASC',<br />
    			//'orderby'   => 'menu_order',</p>
    <p>			'posts_per_page'	=> $per_page,<br />
    			'paged'	=> $paged,<br />
    			);<br />
    		}</p>

    http://wordpress.org/plugins/wp-catalogue/

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

    (@stinger33)

    Hello, I made a sorting by brand, but now I wanted to have a relationship between the brands and categorys, that I can sort by brand, being in that category? rtsystem.pl/rt

    <p>$term_slug	=	get_queried_object()->slug;</p>
    <p>		if($term_slug=true){
    		$args = array(
    			'post_type'=> 'wpcproduct',
    			'order'     => 'ASC',
    			'orderby'   => 'menu_order',
    			'posts_per_page'	=> $per_page,
    			'paged'	=> $paged,
    			'tax_query' => array( 'relation' => 'OR',
    				array(
    					'taxonomy' => 'wpccategories',
    					'field' => 'slug',
    					'terms' => get_queried_object()->slug</p>
    <p>					),
    				array(
    					'taxonomy' => 'marka',
    					'field' => 'slug',
    					'terms' => get_queried_object()->slug</p>
    <p>				)));</p>
    <p>		}else{
    			$args = array(
    			'post_type'=> 'wpcproduct',
    			'order'     => 'ASC',
    			'orderby'   => 'menu_order',
    			'posts_per_page'	=> $per_page,
    			'paged'	=> $paged,
    			);
    		}</p>

    Why is your posted code full of <p></p> tags?

    Thread Starter stinger33

    (@stinger33)

    I do not know pasted code between </ code>

    Plugin Author Maeve Lander

    (@enigmaweb)

    Sorry @stinger I’m struggling to understand what your question is. Please can you clearly explain what you’re trying to achieve?

    If you’re having problems pasting in code here you can do it via Pastebin.

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

The topic ‘Multiple taxonomies?’ is closed to new replies.