Tag Info

New answers tagged

0

First of: Your custom title suffix getting duplicated might not be what you want to happen, but is expected behavior as per your code sample. The save_post action hook runs everytime a post (or page) is created or updated. Hence your callback runs everytime. Let me offer two solutions: 1 Use the wp_insert_post action instead The wp_insert_post action ...


-1

I can't comment yet, so I ll try to guess that the one that is getting duplicated is the post and not just the post title. Try this: function modify_imac_title( $post_id ) { // ['post_title'] create $vars for custom title setup $ghz = get_post_meta( $post_id, 'imac_processor', true ); $strip_ghz = preg_replace( '/z.*$/', 'z', $ghz ); $ram = ...


0

I solved this problem using this excellent jQuery plugin that checks the dirty state of a form. It contains methods to checks added/removed/modified fields via javascript. It totally kicks ass! I did not handled the "AUTOSAVE" (yet). I hope someone finds this useful.


1

The post_category needs to be passed as an array of category IDs (even if you're only adding one category). Try this: $post_data["post_category"] = array( $catslug->ID );



Top 50 recent answers are included