Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add custom tab to profile page


  • Dave
    Participant

    @deeve007

    This should be simple but haven’t been able to find info on how to do this.

    I want to add a custom tab/link with content to the bbPress profile page (NOT using Buddypress at all), I’ve come across people saying it can be done, but no actual guide/info to how it can be done.

    Any help appreciated. Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)

  • Robin W
    Moderator

    @robin-w

    @deeve007 – it’s doable, but you’ll need to do some coding.

    The key file you want is

    wp-content/plugins/bbpress/templates/default/bbpress/user-details.php

    so

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/user-details.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/user-details.php

    bbPress will now use this template instead of the original
    and you can amend this

    you’ll see the tabs in this file.

    Do come back with what you are trying to do if you need further help


    Dave
    Participant

    @deeve007

    I’ve been able to do that, add a link, but how do I have that link then load content that will appear in the content area and under the profile URL?


    Robin W
    Moderator

    @robin-w

    that depends.

    Can you outline exactly what you are aiming for eg I want a picture of fred to appear when they click a link saying ‘fred’


    Dave
    Participant

    @deeve007

    Why should that make a difference? Once I can find out how this is done I could add any content.

    To keep it simple, let’s just say hard coded text to display, when the user clicks on a link called “Read this”.

    Thanks.


    Robin W
    Moderator

    @robin-w

    Arguing with those trying to help you is probably not the best way forward.

    How to do a link is easily googled, but I’ve put one in here that you can add to the template

    <li>
    	<span class="vcard bbp-user-profile-link">
    		<a class="url fn n" href="www.mysite.com/read-this" title="read this">Read this</a>
    	</span>
    </li>

    Dave
    Participant

    @deeve007

    It was a legit question, not an argument, does it make any difference what the content is that I want to display?

    And adding the link is the simple part, but after hours of googling I’ve not come across any guide to how to have that linked content appear within the user profile, rather than link away from the profile to another part of the site.


    Robin W
    Moderator

    @robin-w

    ok, I’ve spent several annoying hours trying to work out how to do this, and failed miserably!!

    I expect the answer is just a few brief lines of code, and linked to the way bbpress handles both templates and wp-rewrite, but can’t fathom it out in the files

    Sorry, but I am having to give up !


    Dave
    Participant

    @deeve007

    Thanks. Yep, tried so many things myself, seems ridiculous that this is so hard!

    Only work around I can think of is to create user-details.php and user-profile.php pages, then have the links on user-detail page change content via Jquery that is on the user-profile page, in different DIVs, rather than go to separate pages. Then you could add further content to the user-profile page easy enough.

    If that makes sense?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar