How do I assign a custom post to all terms in a custom taxonomy?
With functions like get_terms, there is an argument hide_empty that will allow terms without associated posts to be shown. Set hide_empty to 0 and you will see your terms.
With functions like get_terms, there is an argument hide_empty that will allow terms without associated posts to be shown. Set hide_empty to 0 and you will see your terms.
Ok, I’ve solved my problem, though my question (why I need to put die() at the end of my load-* function to let it show) remains unanswered. I couldn’t find any way to use tb_show and at the same time send super global post variables to the destination url. tb_show simply calls a url and … Read more
Since I didn’t expected an answer to this question I tried it with wp_delete_attachment();. I wrote this function on a random page of my site (since the site isn’t live yet) and executed it from there. $attac_kill_ids = range(1235, 22686); //fill an array with the post_ids from the empty instances foreach( $attac_kill_ids as $kill_id ){ … Read more
Your question is too broad. Break the question down into more specific questions. Then research those questions and bring the unanswered questions to us. For example, you might break this down into these specific questions. How do I: Add a menu item to the Dashboard? Create an admin options page form? Submit a custom admin … Read more
Bulk remove category from custom post type?
update_post_meta() not working in bulk option
The sql command would be the most effective, clean and fast method to my knowledge. You can use this command to set all content to the desired value: UPDATE wp_posts SET post_content=”YOUR POST CONTENT HERE”;
The hook you choose is important here. I found success choosing the latest hook I could wp_insert_post. If other functions are hooked to the same action they need to be considered because if they create/update posts too these hooks will be called again. The codex lists the Post, Page, Attachment, and Category Actions (Admin) in … Read more
After searching through WordPress core I found the following on lines 1051 – 1057 of wp-admin/includes/class-wp-posts-list-table.php if ( post_type_supports( $screen->post_type, ‘title’ ) ) : if ( $bulk ) : ?> <div id=”bulk-title-div”> <div id=”bulk-titles”></div> </div> <?php else : // $bulk ?> So, in order for the #bulk-titles element to be part of your admin list … Read more
I was able to solve my problem by calling set_post_format in my save_post callback and making sure to check if its set and not equal to the “no change” option. Not sure if this is the best way to go, but it works. require( plugin_admin_dir . ‘plugin-sync.php’ ); add_action( ‘save_post’, ‘savethepost’, 2000); function savethepost($post_id) { … Read more