WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My shopping cart displays the order history on the last page the customer visited. For example, www.someurl.com/item1 is the last page the customer visited before checkout. An order confirmation email is sent with a link to that order as well as the customers entire order history. The link address is www.someurl.com/item1/#!/~/orderConfirmation.

I would like my header to read "item1" on www.someurl.com/item1, and "history" on www.someurl.com/item1/#!/~/orderConfirmation.

I am using Wordpress 3.5.2 with a twenty-twelve child theme

Can this be accomplished? Any help is greatly appreciated

share|improve this question
"Header" can mean different things to different people, write or wrong. What exactly do you mean? What shopping cart do you use? – s_ha_dum Jun 27 '13 at 17:44

I got to work. I don't know if it's the most efficient method, but this is what I did: Also, for whatever reason I couldn't get it do display my header (custom page title) when I declared the variable within the same script. Any feedback is greatly appreciated, but please keep in mind I'm an old Cobol programmer. I have trialed and errored my way through this website.

var myurl=document.URL; if (myurl == "http://URL/alabama-jumpers/#!/~/orderConfirmation") {null} else if (myurl == "http://URL/alabama-jumpers/#!/~/orders/offset=0") {null} else {document.write("Alabama Jumpers")}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.