• Hi. I’m building wp into a ‘static’ site using moshu’s great tutorial at https://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.
    Will

    PS. I’m copping this from a mezzoblue article.
    https://mezzoblue.com/archives/2005/06/08/simple_templ/index.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter syrupcore

    (@syrupcore)

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

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

    instead of get_header and it works.

    Thread Starter syrupcore

    (@syrupcore)

    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.