custom template having custom post type category translations
-
Hi,
I’ve done custom post type with it’s categories and loading them into a Page Template. My script looks like:
$args = array( 'post_type' => 'portfolio', 'paged' => $paged, 'portfolio-category' => 'mot', 'posts_per_page' => esc_html($portfolio_number) ); $portfolio_query = new WP_Query($args);
I’ve translated custom post type categories and made dublicates of this post type to another language. If I switch language, I can’t see any custom posts there.
I know I must change
'portfolio-category' => icl_object_id(get_cat_ID ("mot"), 'category', false),
but then I get all posts, not depending on category..I must tell, I do have 3 such custom post type categories. Each of them has it’s separate page template loading their custom posts with provided code. Plugin: WPML
Any help would be appreciated..
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘custom template having custom post type category translations’ is closed to new replies.