szunyi
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Insert post from PHP scriptok thx
Forum: Fixing WordPress
In reply to: Insert post from PHP scriptokay, start again, my question is how can i insert post to my wordpress from PHP file?
Forum: Fixing WordPress
In reply to: Insert post from PHP scriptyes i tried, but the error is:
“Fatal error: Call to undefined function wp_strip_all_tags() in /home/penzker/public_html/test.php on line 11”Forum: Fixing WordPress
In reply to: Insert post from PHP scriptstill not answered, i dont know still how can i insert post to my wordpress 🙁
Forum: Fixing WordPress
In reply to: Insert post from PHP script<?php
ini_set(‘display_errors’, 1);
error_reporting(E_ALL);require(“wp-includes/post.php”);
// Create post object
$my_post = array(
‘post_title’ => “qwe”,
‘post_content’ => wp_strip_all_tags($content),
‘post_status’ => ‘publish’,
‘post_author’ => ‘1’,
‘post_category’ => array( 1,2 )
);wp_insert_post( $my_post );
?>
Forum: Fixing WordPress
In reply to: Insert post from PHP scriptOkay, i want to insert post to wordpress from PHP file.
When i open the “mydomain.com/testinsert.php” that script will post the content to db and the wordpress will show it…Forum: Fixing WordPress
In reply to: Insert post from PHP scriptbut first need some include, right?
if yes what kind of files need to include?