• Resolved snehal1ho

    (@snehal1ho)


    Hello,

    I am trying to customize the url using rewrite rule in wordPress.
    Rewrite rule working fine if the url contains only the English character but when i am adding Hebrew value it not giving the parameter value.

    I am accessing the url parameter value using

    
    global $wp_query;
    $category_name_data =  $wp_query->query_vars['category_id'];
    

    if i print this $category_name_data veritable its adds character like
    -%D7%91%D7%A8%D7%96 insted of Hebrew word.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    The %D7%91%D7... bit is how WP stores non-latin characters. To restore these to actual Hebrew, run the string through urldecode(). The sequence you provided then becomes “ברז”.

    The URL encoded %D7 format is the hexadecimal unicode sequence for non-latin characters.

    Thread Starter snehal1ho

    (@snehal1ho)

    Thanks for this! Exactly what I was looking for.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Access hebrew query string value’ is closed to new replies.