0
votes
1answer
28 views

How can I programmatically save data into custom fields that contain serialized data?

I purchased a theme from themeforest recently that has a custom post type. Here is a link to a page that's been created with the custom post type: ...
0
votes
1answer
55 views

How do I programmatically add items to a custom post type?

I have a custom post type to which I'd like to programmatically import data. I have followed these instructions and these, and I can easily do it for WP typical pages and posts. However, my custom ...
0
votes
3answers
112 views

Conditionally set post_content in wp_insert_post

Is it possible to conditionally set the post_content in wp_insert_post? Im using a foreach to add multiple pages at once: foreach ($create_pages as $new_page) { $add_pages = array( ...
-1
votes
1answer
75 views

Use of wp_insert_post and parameters

I've JUST started using WordPress..i'm trying to add posts to Wordpress using php and i came across this piece of code: // Create post object $my_post = array( 'post_title' => 'My post', ...
1
vote
1answer
270 views

Creating a post from data returned from HTML form

I am trying to write a WordPress plugin and I have hit a bump. The Background: I have some data in a mySQL DB that I am using (each row has a unique ID and some other information I have added). I am ...
0
votes
0answers
129 views

Getting error when using wp_insert_post()

When I use wp_insert_post() I get a white page that says "Are you sure you want to do this?". I get no PHP errors. I am using this outside of wordpress and have wp-load.php as well as ...
0
votes
1answer
107 views

Post content not showing some content

I'm inserting posts by wp_insert_post function. It works like first a post is created to get its id then an image is attached to that post id. I attach images by media sideload function. Here is the ...
0
votes
1answer
128 views

how to add datas in taxonomy to post with wp_insert_post

how to add datas in taxonomy to post with wp_insert_post this is my code but it is saved in my texonomy draft,why? i have given post_type=publish. $my_post = array( 'post_title' => ...
3
votes
2answers
354 views

PHP/Manual use of images? - 2 Questions

I've made a quick PHP script/page that uses the wp_insert_post() function to insert a post directly. And this works great. The post I am manually adding has an image in it, so I firstly ...
0
votes
1answer
124 views

Somehow adding to “Insert Into URL” posts are contradicting each other

I added a second upload image ( doc_thumb_box ). They both work perfectly independent of each other. But when the second one is added, the first one (doc_uri_box ) no longer pastes the value of the ...