Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add Page content before directory listings on members page


  • Slushman
    Member

    @butimnoexpert

    I’m creating a directory for a client using BuddyPress profiles. On my test site (http://makemeanexpert.com), I created a custom menu link called Network which takes you to the BP members page. The client would like to add a description of the directory above the members listing, but have it be easily editable on the backend (not hard coded into the page).

    What I have in mind is to create a page in WordPress that’s not listed on the menus, where they enter the directory’s description. The content for that page would appear just above the members listing on the BP members. I see there’s a function called bp_before_directory_members_content, but there doesn’t seem to be any documentation about how to use it. Has anyone used that function or could give me a better way to accomplish this?

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

  • Slushman
    Member

    @butimnoexpert

    I figured it out. It’s not quite as elegant as I was hoping, it works. I put the following code right after `

    ` in the member.php theme file.

    `have_posts()) : $recent->the_post();?>

    `

    The page ID needs to be the page id # for the page you’d like to use for the description. It has to be the number though, the function doesn’t work with anything but an integer. I found my page’s id by mousing over the page name on the Pages listing in WordPress; the number is in the link.

    You can see the output at http://makemeanexpert.com/members.


    @mercime
    Participant

    @mercime

    @butimnoexpert I use the very same method to “embed” a page editable in dashbaord into home page or other pages.
    Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add Page content before directory listings on members page’ is closed to new replies.
Skip to toolbar