Forums

[resolved] Changes in header.php not showing up site-wide (5 posts)

  1. dcb50
    Member
    Posted 1 year ago #

    When making changes in header.php, they're showing up on the index, but not any of the other pages, like a single post. I know that at one time they did, because my single post pages header matches the index.

    I even added some code into footer.php, and it showed up on the index, but not the individual posts.

    My site: athensmusic.com

    Am I just overlooking something simple (I hope)? Any ideas or direction would be appreciated.

  2. charliestout
    Member
    Posted 1 year ago #

    Don't know what I'm looking for here...but it would seem that each header on each page is a randomly selected image. What are you trying to get the header to do?

  3. dcb50
    Member
    Posted 1 year ago #

    It's not the image I'm having the problem with. Specifically, there is a chunk of code in the header for Omniture statistics. When you look at the source code on the index, you can see it. But when you click on a headline (or the comment link) and go to the single post page, that code is not showing up when you look at the source (and not showing up in my Omniture stats). So I tried making another change in header.php (added another image to the rotation) and the change showed up on the index, but not on the individual post page. I even threw the Omniture code into footer.php, and again, it showed up on the index, but not on the indiviudal post page.

    Thanks,
    David

  4. charliestout
    Member
    Posted 1 year ago #

    Lemme guess - Omniture is showing traffic for the home page but no other page, even though you have the Omniture code IN every page because it's in the header which gets slurped into every page, right?

    You'll need to use a wordpress template tag in your omniture code which will identify the title of each page. Most of the time, if your Wordpress template is coded correctly, the title tag will display the site name and the current page/post slug. That's what you want to send to Omniture when each page is loaded.

    Replace your var s_pagename line with this:

    var s_pageName= "<?php wp_title(); ?>"

  5. dcb50
    Member
    Posted 1 year ago #

    Charlie,

    We actually somehow fixed the problem. A friend tinkered with the code and it started working. The problem was that Omniture was NOT in every page, just the home page. The other pages were not slurping header.php into them.

    But I will try using the php in the pageName. Thanks for that.

    David

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.