Error: Could not update post in the database
-
Hi I have been working on a template/theme change that added a comment box to one of my sections. At first the comment form wasn’t appearing and noticed in one of my custom post type/pods that the comments tick box wasn’t checked. so I ticked it. still didn’t come up.
I found a function that you run once and it enabled comments on all existing posts, which worked. but since roughly then I can’t seam to edit or add to my pods/custom post types.
annoying thing is I cant find the script I used. it was working from WP database calling stuff so I’m assuming I screwed something up but I’ve made changes that I don’t want to do.
is there a way to manually switch the two other CPT comment tick boxes manually either via the database or via a file? as I think this is why they are failing.Edit: cant seam to add or edit any pod same message as title
Cleared pod cache tooEdit 2: searched in phpmysql for “supports_comments” found the two missing ticks but still nothing. not sure how long this has been an issue now as ive not needed to edit my pods :S
Edit 3: the code I used for opening all the comments on CPT
function switch_on_comments_automatically(){ global $wpdb; $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET comment_status = 'open'")); } switch_on_comments_automatically();
The topic ‘Error: Could not update post in the database’ is closed to new replies.