I am using add post meta function to save some data and its not working
<?php //include '../../../wp-blog-header.php'; $unique = "true"; $pageID = $_GET['postID']; echo "pageID:"; echo $pageID; echo "</br>"; $num_posts = $_GET['num_posts']; echo "num_posts: "; echo $num_posts; echo "</br>"; $num_posts_meta_key = "num_posts"; add_post_meta($pageID, $num_posts_meta_key, $num_posts , $unique) or update_post_meta($pageID, "num_posts" , $num_posts); ?>
Can someone help me out?
I tried using method POST ...but then it doesnt work for me. It just submit the page and come back w/o doing anything on 1st page. I tried with GET method..but nothing works.
I am very new to wordpress plugin coding. I thought POST method in my plugin is conflicting with some other post method in post.php..not sure though..
I am writing plugin for admin panel.
Add custom markup to Wordpress menu
1:WordPress > wp_list_categories with no child categories listed
The first thing this function will did is make sure this $meta_key already exists on $post_id. inserting images into multiple tinyMCE editors in wordpressIf it does not, add_post_meta($post_id, $meta_key, $meta_value) is called instead and its result is returned.. Add tweet button on wordpress blog
<?php // This minimum code should work, though you should really check this a post // with this id does exist. update_post_meta($_GET['postID'], "num_posts" , $_GET['num_posts']); ?>