The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Customizing pages - need help (1 post)

  1. HellPunk
    Posted 10 years ago #

    I'm trying to do the following... if i have a page with this url


    the function get_header2(); is define and will get header2.php when called (this is working).

    but i have 6 pages and for each i would like to load a diferent header.php

    header1.php, ... header6.php

    each has a function working, since i already tested it on the index.php code.

    But now i'm trying to create a PHP script that would do the following.

    Since each page has a specific ID, i would load each "header" script for its specific page id.

    I have tried this script

    <?php if (page_id('1')):php get_header1();
    else (page_id('2')):php get_header2();
    else (page_id('3')):php get_header3();
    else (page_id('4')):php get_header4();
    else (page_id('5')):php get_header5();
    else (page_id('6')):php get_header6()
    endif ?>

    but unfortunaly is not working

    If someone can help Thanks in advance!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.