首页 文章

使用MySQL查询创建Wordpress页面 - 无法正常工作

提问于
浏览
0

我正在尝试使用MySQL查询创建一个Wordpress页面 . 这是我的查询 .

INSERT INTO wp_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`) 
VALUES (1, '2010-11-29 14:05:04', '2010-11-29 08:05:04', 'cool.', 'Nice', '', 'publish', 'open', 'open', '', 'nice', '', '', '2010-11-29 14:05:04', '2010-11-29 08:05:04', '', 0, 'http://exampleurl.net/', 0, 'page', '', 0);

如果我执行上面的查询,它会创建新页面 . 现在,如果我尝试使用浏览器访问页面,它会显示给我

Not Found
Apologies, but the page you requested could not be found.

注意:我使用自定义永久链接:/%category%/%postname% .

1 回答

  • 0

    你在做什么!?不要使用原始SQL插入帖子,使用函数wp_insert_post()

相关问题