• Hi,

    Based on category ids I want to include different headers.

    Eg:

    If array of category id – 1,2,3 include header1.php

    elseif array of category id – 4,5,6 include header2.php

    I just wrote the basic flow on how I want it. I’m novice, please assist.

    What should be the actual code go and where should I put it.

    Thanks in advance.

    Raghav

Viewing 1 replies (of 1 total)
  • You would need to called your header files header-1.php and header-2.php. Then you could use something like:

    $header_suffix = '';
    if( is_category( array( 1,2,3 ) ) ) $header_file = '1';
    elseif( is_category( array( 4,5,6 ) ) ) $header_file = '2';
    get_header( $header_suffix );
Viewing 1 replies (of 1 total)
  • The topic ‘Based on category ids I want to include different headers’ is closed to new replies.