How to use multiple check-box values to work in a function and insert values in database

Currently you are passing on this value: ‘post_category’ => array(‘3,4,5’) // This is a single string While you should be doing this: ‘post_category’ => array(3,4,5) // Three separate values Don’t forget to sanitize the POST values neither: // Initialize categories $post_category = array(); // Prevent “undefined variable” error notices if (isset($_POST[‘vtype’])) { // Loop over … Read more

Your ideas on my though “delete or move all of the posts in a specific category when 3 days are passed”

here is a quick plugin i cooked for you 🙂 <?php /* Plugin Name: Post Auto Removal Plugin URI: http://en.bainternet.info Description: Post Auto Removal lets you schedule when the post / page / custom type will be deleted automatically. Version: 0.1 Author: bainternet Author URI: http://en.bainternet.info */ /* hook meta box */ add_action(“admin_init”, “admin_init”); /* … Read more

Getting WordPress to work inside a rails 3 application

I had a similar problem, but handled the VirtualHost configuration in a different way: Used an Apache mod_alias to redirect what for you is /home/blog/ to a path outside of /var/www/railsapp/public/ (e.g., /var/www/wordpress) Then, for that new hosted directory I had to declare PassengerEnabled off to avoid getting the standard rails error message. I’ve wrote … Read more

Need help fixing sql syntax error after WP 3.2 upgrade

I ran into this as well… I am using the SQL query, but not the wpfp_list_most_favorited() function, so this may or may not work for you, but worth a shot. Try updating the SQL query in wp-favorite-posts.php (around line 206) from: $query = “SELECT post_id, meta_value, post_status FROM $wpdb->postmeta”; To: $query = “SELECT post_id, meta_value, … Read more

Displaying table data on a page

Had you looked into plugins tagged “table” in official repository? As for coding it by hand it should not be too complex, use $wpdb to query database and loop/output results with HTML table markup.

Custom Database Table and foreach

Assuming you have table that’s prefixed with the WordPress prefix (even if it’s not the default one), and the table is called table. Then the following code should select everything, and allow you to go through each row. In this example, it goes through each row and outputs the content of the field foobar. global … Read more