Forums

is_page --> include (4 posts)

  1. rasmuscarlsen
    Member
    Posted 1 year ago #

    Hi,

    I need to include something simple:

    <?php include("splash.php")?> - and thats works just fine

    However - I need on specifik pages and I dont want to start screwing the funcions.php (and similar).

    My poor skills tels me to combine my very nice Include with this simple thing:

    ` <?php
    if (is_page(home)){};

    ?>`

    How?
    (or should I make a function?)

    thanks

    rasmus

  2. Matt McInvale
    Member
    Posted 1 year ago #

    If you want it to show up on your homepage, I like using is_front_page().

  3. rasmuscarlsen
    Member
    Posted 1 year ago #

    yeah - I used is_page(home) but its the syntax I dont know

    ` <?php
    if (is_front_page){<?php include("splash.php")};

    ?>`
    ???
    ras

  4. rasmuscarlsen
    Member
    Posted 1 year ago #

    bingo:

    <?php if (is_front_page()) include("splash.php")?>;

Topic Closed

This topic has been closed to new replies.

About this Topic