Add a new post status in the post progression
I recommend you install the Editflow plugin, it lets you add arbitrary post statuses so that you can customise your workflow as you wish http://editflow.org/
I recommend you install the Editflow plugin, it lets you add arbitrary post statuses so that you can customise your workflow as you wish http://editflow.org/
What is the SQL query you are using? What are more details of the export and end format you need? The obvious things are 1) http://wordpress.org/extend/plugins/navayan-csv-export/ “Navayan CSV Export is a wordpress plugin to export all your table data in CSV (Comma Separate Value) format.” and 2), exporting with phpmyadmin – the database utility – … Read more
The documentation for wp_insert_post() says: wp_insert_post() passes data through sanitize_post(), which itself handles all necessary sanitization and validation (kses, etc.). If we dig through it, we can find the responsible filter as: add_filter(‘content_save_pre’, ‘wp_filter_post_kses’); within the kses_init_filters() function. When the kses is initialized with kses_init() it runs: kses_remove_filters(); if ( ! current_user_can( ‘unfiltered_html’ ) ) … Read more
I found the answer here. Remember to pop in there and give it a like. I’ll post it here, for people in a rush. Put this into the functions.php-file: function wp1482371_custom_post_type_args( $args, $post_type ) { if ( $post_type == “post” ) { $args[‘rewrite’] = array( ‘slug’ => ‘blog’ ); } return $args; } add_filter( ‘register_post_type_args’, … Read more
Why not make the towns child terms of each state? The taxonomy could be location: See MikeSchinkel’s detailed q and a regarding hierarchal taxonomies. A more elegant solution than refreshing the page upon state selected would be to load the “thetown” child terms using ajax and the get_term_children function or the custom $wpdb query outlined … Read more
This is more of a JavaScript the A WordPress Question but anyway, You can use the JavaScript onbeforeunload event something like: <script type=”text/javascript”> old = window.onbeforeunload; window.onbeforeunload = MyOnExit; function MyOnExit(){ //do your stuff here return old(); } </script>
I had the same idea and wrote a small little plugin to help me do this. function get_pew_related_data($args, $post_id, $related_id) { global $post, $wpdb; $post_id = intval( $post_id ); if( !$post_id && $post->ID ) { $post_id = $post->ID; } if( !$post_id ) { return false; } $defaults = array( ‘taxonomy’ => ‘topics’, ‘post_type’ => array(‘post’), … Read more
What about an approach like this: $first_category_args = array( // category id ‘cat’ => 123, // get all from cat ‘posts_per_page’ => -1, // don’t prepend sticky ‘ignore_sticky_posts’ => 1, // only return ids ‘fields’ => ‘ids’ ); // array of ids $first_category_query = new WP_Query( $first_category_args ); $first_category_ids = $first_category_query->posts; $second_category_args = array( // … Read more
WordPress uses the attachment filename to create the attachment post slug. If your file was named something else, there would not be any conflicts. If you have your post permalinks set to /%postname%/ , and you upload an image FIRST, and then create a post SECOND, then WordPress has to make a choice between the … Read more
WordPress is strongly opinionated about using absolute URLs. Doesn’t mean it’s better but it’s a choice is makes. The common way to handle it is replace as necessary in database. Please note that if you run replacement on all of database it is extremely important to use serialize–aware tool, or you risk corrupting the data.