fauzanjeg

Fix Polylang Home URL

Dec 8th, 2021
788
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Fix Polylang Home URL */
  2. function home_url_multilang( $path = '', $scheme = null ) {
  3.     if ( function_exists( 'pll_current_language' ) ) {
  4.         return home_url( pll_current_language() . '/' . $path, $scheme );
  5.     }
  6.     return home_url( $path, $scheme );
  7. }
RAW Paste Data