View Full Version : Back to last page viewed that is not is_page()...?

10-31-2006, 01:51 PM
hello! i was wondering if php is capable of doing the following and if so was hoping i could get some help doing it.

i have a wordpress blog and change the content of the sidebar depending if the page being viewed is part of the blog (home, archive, search, or single post) or an actual seperate page (like the about, disclaimer etc).

what i'd like is to have a link on the sidebar when viewing a page that says "back to blog" thats acts as a back button like in a browser, going back to the last page viewed. except what i want is for it to go back to any page that isnt a page, so basically the last blog page. um, does that make sense?

let me try again.

person is looking through blog
clicks on a page
wonders through pages
clicks on "back to blog"
redirected to last blog page

does that make sense?

hope it does, thank you in advance for any help!

10-31-2006, 06:47 PM
so would the user be looking at pages that are not in the blog.. then when they press "back to blog" it takes them to the most recent blog entry??

(sorry, not 100% sure what you mean!)

12-11-2006, 12:36 PM
sorry for the very late reply! I mean you know how WP has the blog (single post view, home page, archives etc) and then static pages? I'd like a back button on the static pages that would send the user back to the last page that was not a static page on the blog. I hope that clearer :)