Εvery put up should have an submit button and when person click on it then the put up goes to a different cpt.
perform click_button()
{
$button= '<kind id="formid" motion="button.php" technique="put up">
<enter sort="hidden" identify="motion" worth="button" class="button"/>
<enter sort="submit" identify="Submit" class="button"/>
</kind>';
return $button;
}
add_shortcode( 'button', 'click_button' );
button.php
perform button()
{
if($_POST['submit']) {
//echo "Howdy world!";
$information = array(
'ID' => $post_id,
'post_type' => 'bdg_books_wanted'
);
wp_update_post( $information );
}
Can somebody inform me what i’m doing unsuitable?