Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to display the content on member page


  • Sébastien SERRE
    Participant

    @sebastienserre

    Hello,

    I’d like to display the content (present in admin) on the members directory page on frontt.
    I’ve checked the members-loop template file but don’t find any info about it.

    var_dump($post); display:
    object(WP_Post)#17484 (29) { ["ID"]=> int(0) ["post_author"]=> int(0) ["post_date"]=> int(0) ["post_date_gmt"]=> string(19) "2016-08-02 12:31:43" ["post_content"]=> string(0) "" ["post_title"]=> string(11) "Les Membres" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(6) "closed" ["ping_status"]=> string(6) "closed" ["post_password"]=> string(0) "" ["post_name"]=> string(7) "membres" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2017-01-19 14:32:56" ["post_modified_gmt"]=> string(19) "2017-01-19 13:32:56" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(25) "http://localhost/membres/" ["menu_order"]=> int(0) ["post_type"]=> string(4) "page" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" ["is_404"]=> bool(false) ["is_page"]=> bool(true) ["is_single"]=> bool(false) ["is_archive"]=> bool(false) ["is_tax"]=> bool(false) }
    How to get post_content ?

    many thx

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

  • danbp
    Moderator

    @danbp

    Hi,

    what do you mean by “content present in admin” ? There is many stuff in admin… Also, the member directory show by default a list of the site members, their last connection and an update excerpt (if exist)…

    What exactly do you want to show on your-site.com/members/ ?


    Sébastien SERRE
    Participant

    @sebastienserre

    I’d like to display the_content() of the loop.
    the_content


    danbp
    Moderator

    @danbp

    That’s what i expected, but you’re wrong and can’t get any content from there.

    Members is a BuddyPress page which should stay empty. This page (like the other BP pages) exist for internal purpose only. WP create the slug and BP need that slug to fire dynamic content into the “members” page.

    To resume, the page called “members” is mandatory, and depending the context, will show different things.

    your-site/members/ -> the members list
    your-site/members/seb/ -> Seb’s profile
    your-site/members/seb/notifications -> Seb’s notification
    etc….

    You’re always on the same permalink/page, but with very different content.

    If you need to add some content to the member page, you can do that by using the action hooks you’ll get on the different contextual templates.

    Or a little more complex, by hardcoding something yours into a template, with help of a child theme.

    Or even much better, specially if you want to reuse your work on another site, with a plugin. But whatever, you have to use the template parts, not the page itself, or the “page editor”, which is to write static content.


    Sébastien SERRE
    Participant

    @sebastienserre

    Do you think I can use this content area to let my customer customizing content or I have to create an ACF fields and working with ACF?


    danbp
    Moderator

    @danbp

    Again, you can’t use the content area. Mais si tu préfères que je te le répète en français, y’a pas de problème: tu ne peux pas utiliser l’éditeur pour produire du contenu sur cette page!

    What do you want to do exactly ? Explain and give details, not expectation.


    Archie22is
    Participant

    @archie22is

    Did you ever come right @sebastienthivinfocom? I am just trying to display some copy of top of certain member pages.


    Sébastien SERRE
    Participant

    @sebastienserre

    Try this https://wordpress.org/plugins/bp-display-content/ for multiple reasons, I stopped working on BP.
    Hope it allways work


    Archie22is
    Participant

    @archie22is

    Thank you sir @sebastienthivinfocom?

    I see you solved the problem yourself 🙂

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