WP Nav menu append to url

Using wp_nav_menu() , how can I append a value at end of each URL? For example, I have the following url: http://www.example.com/ but I have to append a language parameter at the end, so the url should be: http://www.example.com/?lang=$language 3 Answers 3 I found the solution modifying the behaviour of wp_nav_menu with the wp_get_nav_menu_items-filter. Here’s … Read more

Redirect users on logout

Have multisite set up and would like to redirect users on logout to the root site home page. I know there has to be an answer for this. But I can’t find it! driving me batty;-) Any help greatly appreciated. 3 Answers 3 you can use wp_logout_url( $redirect); as Pippin sugested if you are echoing … Read more

Why is ‘is_multisite’ returning true when it’s a single install?

I’ve installed a single site WP. In one of my plugins, I have the following code: if(is_multisite) { $upload_dir = get_upload_dir(); $_SESSION[‘root_image_dir’] = str_replace(‘\\’,”https://wordpress.stackexchange.com/”,$upload_dir[‘basedir’]); echo ‘IS MULTI.’; //<– this is outputted every time } else { $_SESSION[‘root_image_dir’] = ”; echo ‘IS NOT MULTI’.$_SESSION[‘root_image_dir’]; } For some reason, the echo statement is triggered every time. Why … Read more