$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>why my wordpress post, created programmatically, not opening detail page & redirecting to index instead|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin9PV0评论

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..

Post a comment

comment list (0)

  1. No comments so far