why my wordpress post, created programmatically, not opening detail page & redirecting to index instead

admin2025-06-05  3

I created a post programmatically using python:

sql = "insert into `wp_18_posts` " \
          "(`post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, " \
          "`post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`," \
          "`to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`," \
          "`guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`, `django_id`)" \
          " values " \
          "(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"

the post is showing up in database and also in index page, but once I click on that post, it is redirecting me back to index again. So detail page is not opening.

I am setting post_status to 'publish'.

I also set the taxonomy in mysql manually. but no success.

appreciate any hint..

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749074209a316131.html

最新回复(0)