123extra
Member
Posted 3 years ago #
hi i want to put something like this in the "post_content" using wp_insert post,
$postcontent = '<div id="xxxx">some text here</div><!--more--><div id="xxxx">some text here</div>';
//using wp_insert_post
...
$my_post['post_content'] = $postcontent;
...
but it truns out wp_inser_post, strip all the html tags
any solution for this? please....
123extra
Member
Posted 3 years ago #
i thing what causing it the kses.php.
please can some one help me.
is there any to avoid kses function?
123extra
Member
Posted 3 years ago #
well, can some one help me. pliis....
123extra
Member
Posted 3 years ago #
if i loggin to WP and run the script. it work. but if i log-out from WP, its stop working.
please can some one give me a solution here
123extra
Member
Posted 3 years ago #
pleaseee, some one help me...
123extra
Member
Posted 3 years ago #
123extra
Member
Posted 3 years ago #
I encountered the same problem...
123extra
Member
Posted 3 years ago #
yes please, can someone help us
123extra
Member
Posted 3 years ago #
does anyone here, really can help us?
123extra
Member
Posted 3 years ago #
123extra
Member
Posted 3 years ago #
please somebody, here.... i really need the solution for this
This problem has troubled me for two weeks, and still is not resolved
I tried to use custom meta, but it is not a good idea
Please help us
123extra
Member
Posted 3 years ago #
please, someone.... need help here...
derianth
Member
Posted 3 years ago #
Well, i have the same problem. Can anybody help us?
derianth
Member
Posted 3 years ago #
'post_content_filtered' => ''
maybe this can discover a right way to resolve our problem?
123extra
Member
Posted 3 years ago #
'post_content_filtered' => ''
maybe this can discover a right way to resolve our problem?
i have try it but still no luck
can you please be more specific?
123extra
Member
Posted 3 years ago #
any one can offer other solution?
123extra
Member
Posted 3 years ago #
123extra
Member
Posted 3 years ago #
i have try
$wpdb->escape and also post_content_filtered, but still not working
please someone help us
123extra
Member
Posted 3 years ago #
please, somebody... needed badly :(
wtfmejt
Member
Posted 3 years ago #
You need to escape the "'s if you do it like this \" it works just fine. I just used it.
this is what I ended up with in my xhtml in my wordpress post
<div id="xxxx">some text here</div>
<!--more-->
<div id="xxxx">some text here</div>
do it like this.
// Create post object
$my_post = array();
$my_post['post_title'] = 'My post';
$my_post['post_content'] = '<div id=\"xxxx\">some text here</div><!--more--><div id=\"xxxx\">some text here</div>'; //This is my post.';
$my_post['post_status'] = 'publish';
$my_post['post_author'] = 1;
$my_post['post_category'] = array(0);
// Insert the post into the database
$idid=wp_insert_post( $my_post );
echo $idid;
echo get_permalink($idid);
123extra
Member
Posted 3 years ago #
still no luck. any other solution. please....
123extra
Member
Posted 3 years ago #
please some body, help me
123extra
Member
Posted 3 years ago #
123extra
Member
Posted 3 years ago #
please someone here whoe kind enough to help us!!!
123extra
Member
Posted 3 years ago #
well, can some one help me. pliis....
123extra
Member
Posted 3 years ago #
does anyone here, really can help us?
123extra
Member
Posted 3 years ago #