Advertisement
fauzanjeg

Fix Polylang Home URL

Dec 8th, 2021
1,116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement