Support » Developing with WordPress » Navigation: Previously viewed page, or a back button

  • I realize this is on the fence that separates the yards of WordPress and bbPress. However, I’ve every confidence I can get the solution here!

    I have a serious need a for a big-ole-fat “Back” or “Previous Page” button to default ONLY on every Topic and Reply page, but on no other pages!

    This way members can visually navigate from the forum board itself, and I can simply disable the bbPress breadcrumbs altogether. Thus, why I believe this is a WordPress issue, and not a bbPress issue.

    How the path is now:

    Enter forum at
    To the topic:
    Back to:

    How I need the path:
    To the topic:
    Back to:

    Thank you in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator bcworkz


    Is it that you want the back action to reverse the user’s browsing path, regardless of where they are in the site’s hierarchy? So not one level up in the breadcrumb trail, but replicating the browser’s back button? You’d have to rely on the browser’s history through JavaScript. window.history.back(); Execute this with the onclick event of the button.

    You can manage the appearance of the button by PHP conditionals that distinguish topics and replies. I don’t know bbPress, but there ought to be something similar to query boolean functions like is_single(), is_archive(), etc. for bbPress items. If all else fails, determine the condition from the query object returned from get_queried_object().

    Thank you SO much for your reply. Exactly, the site history, not hierachy.

    Other than that, I’ve no idea what you’re saying. I guess I need to hire someone to do this for me. This is WAY over my head.

    Thanks though.

    Hey, at least you let me know it’s a WordPress solution and not a bbPress solution. That’s a ton of help.

    Moderator bcworkz


    I’m glad it’s of some help. I’m sorry my response didn’t make a lot of sense to you, it’s hard to answer a technical question without being technical! The solution is really sort of a hybrid. Going back isn’t really even WP, it’s tapping the browser history. The conditionals to determine when to show the button is a bbPress thing because topics and replies are bbPress, not WP.

    If you need any suggestions for finding hired help, I’d suggest places like or I’ve no personal experience with these sites, but the pros available will be well acquainted with WP at least.

    Frankly, you were massively helpful. And, I frankly needed you to be. Saved me time trying to even find the answer. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Navigation: Previously viewed page, or a back button’ is closed to new replies.