If and elseif syntax problem

I’m only getting the first ‘if’ to work. The ‘elseif’ seems to have no effect.

<?php if(is_url('http://site.ca/')){ $page_data = get_page(get_option('boldy_slider')); $content = $page_data->post_content; echo $page_data->post_content; }elseif(is_url('http://site.ca/en/')){ $page_id = 2272; $page_data = get_page( $page_id ); $content = $page_data->post_content; echo $page_data->post_content; }else{?>

…something else happens…

i think its because the first if will always be true because: ‘http://site.ca/’ is also here: ‘http://site.ca/en/’
try swapping them around so you check for http://site.ca/en/ first…

Sponsor our Newsletter | Privacy Policy | Terms of Service