1

Each pass through the foreach() loop, you're wiping out the values that are already in your $urls array. Try something like this: function rel_alternate_network(){ global $post; $slugX = is_main_site() ? $post->post_name : rtrim($post->post_name, '-in-'.strtolower(do_shortcode('[country]'))); $urls = array(); foreach(get_sites() as $...


Only top voted, non community-wiki answers of a minimum length are eligible