Using AJAX in wordpress theme

You need to add the $where parameter to your update statement because it doesn’t know which row to update. The $wpdb->update() method has no default value for the $where argument so you must supply one. http://codex.wordpress.org/Class_Reference/wpdb#UPDATE_rows Try this: $wpdb->update( $wpdb->wp_frm_items, array( ‘alerts’ => 1), array( ‘user’ => get_current_user_id() ) );

Beginner advice

I would strongly recommend that you do not go for books as your main source of knowledge and learning, but instead attempt to code and develop in WordPress itself, then use the internet to research when you have a gap in your knowledge. Take apart plugins and themes that do what you want, or look … Read more

Switching theme only changes style sheet being used

Take a look at my answer here: Switch Theme Through Options Panel The code is as follows: add_action( ‘setup_theme’, ‘switch_user_theme’ ); function switch_user_theme() { if ( in_array( wp_get_current_user()->ID, array( 5 ) ) ) { $user_theme=”fezforprez”; add_filter( ‘template’, create_function( ‘$t’, ‘return “‘ . $user_theme . ‘”;’ ) ); add_filter( ‘stylesheet’, create_function( ‘$s’, ‘return “‘ . $user_theme … Read more

Should I use custom menu, C.P.T. or theme options, or something else for this?

On my website, I’ve used Custom Post Types to achieve a slightly more complex version of what you’re trying to do. My requirements were; Rich text on title JavaScript animation to flick between “Featured Items” (not covered here) Ability to edit the featured items easily from the back-end for admin users Ability to hyperlink the … Read more