SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: is_page()?

  1. #1
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,645
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    is_page()?

    I'm trying to use php on my wordpress page so I Installed the exe-php plugin and had a problem. I placed this in my header.php file
    PHP Code:
    <?php
     
    if ( is_page(2) ) {
    include (
    TEMPLATEPATH 'conn.php'); 
    }
    ?>
    (screenshot)
    The conn.php file has my php connection thing (works on another page)
    PHP Code:
    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname "209.200.229.220";
    $database "nikel0_nikel";
    $username "nikel0_luke";
    $password "***";
    #$nikel = mysql_pconnect($hostname_nikel, $username_nikel, $password_nikel) or trigger_error(mysql_error(),E_USER_ERROR); 
    $nikel mysql_connect("$hostname""$username""$password");
    mysql_select_db("$database");
    ?>
    But What is the problem here,
    http://nikelantiquedolls.com/wordpress/?page_id=2
    Attached Images Attached Images
    "Oh, and Jenkins--apparently your mother died this morning."

  2. #2
    SitePoint Zealot
    Join Date
    Apr 2006
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm pretty sure you can only use a conditional like that after the wp_head(); has been called


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •