Hello, I have a postcreate.php file that creates posts automatically. It is located in my theme folder and works.
But I want to use a function (asa_item) from a plugin which does work in files like single.php but not in my postcreate.php.
Hope you can help.
This is the postcreate.php:
<?php require('CENSORED...' . '/wp-load.php'); global $user_ID; <strong>$abcd = asa_item('B005I4WBMI');</strong> $new_post = array( 'post_title' => 'My New Post', 'post_content' => $abcd, 'post_status' => 'publish', 'post_date' => date('Y-m-d H:i:s'), 'post_author' => $user_ID, 'post_type' => 'post', 'post_category' => array(0) ); $post_id = wp_insert_post($new_post); ?>