Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Create users Pages

  • @bloodslayer

    Participant

    I need to create a users pages in buddypress (like facebook pages) but i can’t find any plugin to doing this or any tutorial to help me. I install buddyblog but not solve my problem because a need a bussiness pages ans more than one per users. Buddyblog only alow to create one blog.

    Anyone have an idea how to do this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • @henrywright

    Moderator

    In the absence of a plugin, you would need to create a front-end form and a server-side processing script which makes use of wp_insert_post().

    Ref: https://codex.wordpress.org/Function_Reference/wp_insert_post

    @bloodslayer

    Participant

    Tks for bou reply but I cant understand where wp_insert_post() is help me. Could you be more specific please? How may I doing this with this code to create a function to create a menu in user profiles to open creation of pages and users like that pages?

    Thanks

    @henrywright

    Moderator

    Hi @bloodslayer

    wp_insert_post() is a function provided by WordPress which lets developers add pages to the database without the need to access the WP admin area.

    So, as an example, you could use it like this:

    $post = array(
        'post_content' => 'This is some content',
        'post_name' => 'this-is-the-page-slug',
        'post_title' => 'I am the title of this page',
        'post_status' => 'publish',
        'post_type' => 'page',
        'post_excerpt' => 'This is the excerpt'
    );
    
    $post_id = wp_insert_post( $post );

    Notes: $post_id will be the ID of the new page or if wp_insert_post() failed (for whatever reason) it will be 0.

    So that’s how you create a new page programmatically. It’s more of a WordPress thing than a BuddyPress thing.

    @danbp

    Participant

    @bloodslayer,

    by default, WP users cannot publish pages, but only post.
    See here for roles and capabilities.

    A Premium plugin exist who let you do this, FormidablePro, also avaible in a free version. More here.

    And to add a FB like button, search on the plugin repo.

    @henrywright

    Moderator

    Good point @danbp


    @bloodslayer
    , you’d need to be logged in as ‘editor’ or upwards (admin or super admin) for my example above to work.

    @bloodslayer

    Participant

    My time is short to do this and publish. I think its possible to duplicate groups? if this is possible my problem is solved because i will have groups and another tab can be used by pages.

    Is that possible?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Create users Pages’ is closed to new replies.
Skip to toolbar