Friday, May 17, 2024
HomeWordPress DevelopmentFeedback not working (error not allowed) on posts with customized put up...

Feedback not working (error not allowed) on posts with customized put up standing


I used to be in a position to make a customized put up standing utilizing this codes:

// Registering customized put up standing
operate wpb_custom_post_status(){
    register_post_status('rejected', array(
        'label'                     => _x( 'Rejected', 'put up' ),
        'public'                    => false,
        'exclude_from_search'       => false,
        'show_in_admin_all_list'    => true,
        'show_in_admin_status_list' => true,
        'label_count'               => _n_noop( 'Rejected <span class="depend">(%s)</span>', 'Rejected <span class="depend">(%s)</span>' ),
    ) );
}
add_action( 'init', 'wpb_custom_post_status' );
 
// Utilizing jQuery so as to add it to put up standing dropdown
add_action('admin_footer-post.php', 'wpb_append_post_status_list');
operate wpb_append_post_status_list(){
international $put up;
$full="";
$label="";
if($post->post_type == 'put up'){
if($post->post_status == 'rejected'){
$full=" chosen="chosen"";
$label="<span id="post-status-display"> Rejected</span>";
}
echo '
<script>
jQuery(doc).prepared(operate($){
$("choose#post_status").append("<possibility worth="rejected" '.$full.'>Rejected</possibility>");
$(".misc-pub-section label").append("'.$label.'");
});
</script>
';
}
}

However each time i attempted posting a touch upon the put up with this put up standing and regardless of having feedback enabled on put up & the wordpress settings im getting this error:

Sorry, feedback aren’t allowed for this merchandise.

Tips on how to repair this? Or any workaround?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments