Skip to:
Content
Pages
Categories
Search
Top
Bottom

Posting with php directly to bbPress fails. how to do it properly?

  • @grayson_marik

    Participant

    Hi there,

    on my page i use the wordPress function to do some automatted posts. however, they do not show up. Only after doing the repair tools they are available.

    This is how i do it :

    `
    $post = array(
    ‘post_title’ => $topic,
    ‘post_content’ => $message2,
    ‘post_type’ => ‘topic’,
    ‘post_status’ => ‘publish’,
    ‘post_author’ => $authorId,
    ‘comment_status’=>’closed’,
    ‘post_parent’ => $parentID,
    );

    $topicid = wp_insert_post( $post, $wp_error );
    `

    The post_meta is not set properly. So what do i have to do to make it work?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @johnjamesjacoby

    Keymaster

    There are a few functions to help with this:

    • bbp_new_forum
    • bbp_new_topic
    • bbp_new_reply

    @grayson_marik

    Participant

    right, still you need to give the meta information for parent forum. got it figured out how to do so, thx.

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