• 12h21

    (@12h21)


    Here some code to use Postratings with Polylang on differents language posts (one master, many slaves)

    // SELECTING MASTER LANGUAGE
    if(function_exists('pll_get_post')) {
    $post_id_master = pll_get_post($post->ID,pll_default_language());
    }
    
    // SHOWING POSTRATINGS WITH CUSTOM ID (MASTER ID POST)
    if(function_exists('the_ratings')){
      the_ratings("div",$post_id_master);
    } 

    I hope that can help someone.

    • This topic was modified 1 year ago by 12h21.
  • The topic ‘Use Postratings with Polylang’ is closed to new replies.