Forums

Calling wp_title with $thisPage (4 posts)

  1. hardwork64
    Member
    Posted 2 weeks ago #

    I've been trying to call the title of a page with <?php $thisPage=""; ?> at the top of header.php using wp_title but without success. Does anyone know the way to do it?

    Thanks

  2. stvwlf
    Member
    Posted 2 weeks ago #

    its not at all clear what you are trying to do from what you described

  3. hardwork64
    Member
    Posted 2 weeks ago #

    Thanks stvwlf.

    I'm trying to call the title of a page with a variable.

    If I have a static page I would use <?php $thisPage="About"; ?> at the top of a page to tell a php file to execute a certain action on the current page, which in this case is called About. And so on with other static pages. But I can't do that with dynamic pages as in WP. I've been trying to use wp_title but doesn't work. So, I can't get the right way of calling the current page with $thisPage. Any suggestions?

  4. hardwork64
    Member
    Posted 2 weeks ago #

    I got an easier way of doing it.

Reply

You must log in to post.

About this Topic

Tags