Support » Plugins » titling plain php pages with variables?

  • Hi. I’m building wp into a ‘static’ site using moshu’s great tutorial at

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • weird. I just tested it by using a straight php include:

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

    instead of get_header and it works.

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘titling plain php pages with variables?’ is closed to new replies.