How to call plugin functions in a custom template

There can be various reason for the undefined function error: The plugin might load its function definitions later than template_include or in the admin backend only. You might have made a syntax error, for example if the plugin is using a namespace, but you are calling the function without that namespace. Or the function is … Read more

Change Post Status From Front End

Simply replace wp_delete_post( get_query_var( ‘postid1’), true ); with wp_update_post( array( ‘ID’ => get_query_var( ‘postid1’ ), ‘post_status’ => ‘draft’ ) ); That is assuming that the rest of your logic does already work.