Support » Plugin: Polylang » Link between my extension and polylang

  • Hello,
    I have a home plugin for creating posttype / meta …
    When loading, I use
    add_action ('plugins_loaded', array ($ this, 'initialize'), 2);

    When editing an element of a posttype ‘besoins’, I add in meta via checkbox posttype ‘realisations’.
    How I can only display the ‘realizations’ posttype that are in the posttype language ‘besoins’ (current page) ?
    I tried
    $besoins = get_posts(array('lang' => 'fr','post_type' => $defaut, 'orderby' => 'title', 'order' => 'ASC', 'posts_per_page' => -1));
    but all elements are visibles.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Link between my extension and polylang’ is closed to new replies.