titling plain php pages with variables? (3 posts)

  1. syrupcore
    Posted 10 years ago #

    Hi. I'm building wp into a 'static' site using moshu's great tutorial at http://www.transycan.net/blogtest/2005/07/05/integrate/2/

    I have WP installed in a subfolder of my root. All the 'static' pages are wp aware via the require(blogpath). I'm using get_header for the static pages as well and I'm trying to have the page titles be dynamic. so in my theme's header.php I have this line:

    <title><?php echo $pageTitle; ?></title>

    and in the body of the individual pages I have:

    <?php require('./writing/wp-blog-header.php'); ?>
    <?php $pageTitle = "TITLE HERE"; ?>
    <?php get_header(); ?> ...

    but no title is showing up. can I not pass a variable like that?

    Thanks for any help.

    PS. I'm copping this from a mezzoblue article.

  2. syrupcore
    Posted 10 years ago #

    weird. I just tested it by using a straight php include:

    <?php include("path/header.php"); ?>

    instead of get_header and it works.

  3. syrupcore
    Posted 10 years ago #

    is this in the wrong thread? maybe it orta be in how to.

    I'm still searching for the answer and not coming up with anything.

Topic Closed

This topic has been closed to new replies.

About this Topic