php load specific post id on language

Solutions on MaxInterview for php load specific post id on language by the best coders in the world

showing results for - "php load specific post id on language"
Gracelyn
11 Nov 2018
1// 1- retrieve the right post ID
2$my_postid = apply_filters( 'wpml_object_id', 1416 , 'post', false ); //wpml
3$my_postid = icl_object_id(1416 , 'post', false ); //polylang @deprecated
4
5$content_post = get_post($my_postid); // 2-use post id