Advance-Blog-PHP-Starter-Project icon indicating copy to clipboard operation
Advance-Blog-PHP-Starter-Project copied to clipboard

Error when user post

Open aghyul opened this issue 2 years ago • 1 comments

when user post something andd another or him click on it it says Sorry!Post not abilable.....

aghyul avatar Sep 27 '21 12:09 aghyul

when user post something andd another or him click on it it says Sorry!Post not abilable.....

its not an error! it has to do with status of the post, in your case the post is in draft state so you have got to publish it first from admin panel and you ll access it.
if you want the regular user or say subscriber to publish their posts without waiting for the admin's approval and access it immediately then you have to change the code in users/add_post.php as follows

  1. change =>>> $post_status = 'draft'; to $post_status = $_POST['post_status'];

  2. add =>>> Publish select option on post_status field with value="publish"

Thindwa avatar May 30 '22 01:05 Thindwa

okey thanks

aghyul avatar Oct 30 '22 08:10 aghyul