Permalinks hide page id from my code
-
Hello,
This post is sort of related to my first and previous post named “Browser address display permalinks and no id” which has been resolved.
This is now my problem;
I have installed the wordpress theme named “Twenty Eleven” and customised it for my purposes.
I want to display a different header image on each page, dependant on the page subject.
In the template named HEADER.php I have some code that looks like this;
switch ($page_id) { case 0: $page_subject = 'BLOG'; break; case 45: $page_subject = 'WEDDING'; break; case 47: $page_subject = 'PORTRAIT'; break; case 51: $page_subject = 'HOME'; break; }Before I activated permalinks this worked fine and changed the image dependant on which page you opened. The only pages that change the image are the BLOG page and HOME. All the other pages display the blog page image.
It appears that the permalinks feature has blocked the page from seeing the page id.
How can I keep my permalinks on and also keep my case statement in the header.
Thank You for any assistance
Ben
The topic ‘Permalinks hide page id from my code’ is closed to new replies.