Support for Themes with Front-end Forms

Sometimes, a WordPress theme will add a post directly to the database instead of transitioning it between post statuses. When this happens (usually via a front-end form of some kind), BNFW can’t pick up the notification as it passes between draft and publish, or draft and scheduled, etc.

In order to add support for your theme, please add the following code to your theme’s functions.php file, replacing the word ‘theme_name’ on line 2 with the name of your theme.

function bnfw_insert_post_hook_for_theme( $themes ) {
$themes[] = ‘theme_name’;
return $themes;
}
add_filter( ‘bnfw_insert_post_themes’, ‘bnfw_insert_post_hook_for_theme’ );

This isn’t always guaranteed to work but it’s a good start. Also note that this isn’t designed to work with plugins – themes only.