Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #221894

    Hi,

    This code was setup with your help a while back but I need to add multiple page id’s (8695, 8587, 8679) , could you help me modify it. Thanks.

    /* Get page_id in order to insert alternate phone number on specific page */
    $page_object = get_queried_object();
    $page_id = get_queried_object_id();

    $phone = $page_id == ‘8587’ ? ‘520.555.9977’ : avia_get_option(‘phone’);

    #222003

    Hi!

    Try with this:

    
    $page_object = get_queried_object();
    $page_id = get_queried_object_id();
    if($page_id == "8695" || $page_id == "8587" || $page_id == "8679"){
    	$phone = '520.555.9977';
    }else{
    	$phone = avia_get_option('phone');	
    }
    

    Best regards,
    Josue

    #222063
    This reply has been marked as private.
    #222330

    Hey!

    Just change this part:

    $phone = $page_id == (’8587′) ? ’520.421.9966′ : avia_get_option(‘phone’);
    

    For this:

    if($page_id == "8695" || $page_id == "8587" || $page_id == "8679"){
    	$phone = '520.555.9977';
    }else{
    	$phone = avia_get_option('phone');	
    }

    Cheers!
    Josue

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘change phone number for multiple page ids’ is closed to new replies.