Tag Info

New answers tagged


After asking this question in several places and not getting a solution, I found the solution this morning myself. Instead of hooking the function send_email_on_pending_post_creation to the "wp_insert_post" action, you need to hook it to the "add_attachment" action which occurs AFTER the post is inserted and when the attachment is added to the post. You ...


At the moment, your PHP file doesn't recognize $wpdb object. To utilize WordPress functions within your PHP file, you should first add WordPress support by adding below to the top of your file: <?php require('/the/path/to/your/wp-blog-header.php'); ?> Then you can use $wpdb - after defining it: <?php global $wpdb; ?> Finally, you should ...

Top 50 recent answers are included