V
V
VANY2015-12-16 22:52:41
WordPress
VANY, 2015-12-16 22:52:41

WPML - how to call a "multilingual rubric"?

<?php
                $args = array( 'category' => 1, 'numberposts' => 3, 'order'=> 'desc', 'orderby' => 'date' );
                $postslist = get_posts( $args );
                foreach ( $postslist as $post ) :
                setup_postdata( $post ); ?>

this is my code to call 3 posts from category with id=1. The problem is that I started translating the site into several languages, and new categories (naturally) are in fact different IDs. How to be in this case? Write a crutch for each rubric?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question