Hi guys,
I’m trying to develop a small plugin which allows me to change the content of various pages without even using the BB interface. (Sounds redundant I know, but it’s part of a bigger project.)
Normally in wordpress, if I want to change the content of a page, I use wp_update_post with the field that correlates to the database being "post-content’.
Using wp_update_post still actually works - even if BB-plugin is installed. When you deactivate it, all the text content is changed to what you put in wp_update_post. But, as long as the bb-plugin is active, it hides whatever is typed and utilizes the bb-plugin templates or whatever.
So my question is - how would I go about changing these bb-plugin pages? With a method similar to wp_update_post?
Does BB-plugin store it’s page data in templates? Does it store it in the database? Is it possible to access and change a bb page using php?
WP update post for reference is below:
// Update post 37
$my_post = array(
'ID' => 5, //(correlates to the home page for example)
'post_content' => 'This is the updated content.',
);
// Update the post into the database
wp_update_post( $my_post );
What I’m trying to do is have a ‘pre-fill content’ plugin.
Basically my plugin will have let the user select the Page, then select via checkboxes which text blocks to add (for example “Info about dogs”, “Info about cats”).
Then hit ‘save’. And all the check boxes’ info that was selected would get in-putted into new text modules in BB.