Visual (non-HTML) display of post revisions [closed]
The plugin Revisionary let’s you preview the revisions. But it also adds other functionality (Pending revisions), so maybe not the best solution.
The plugin Revisionary let’s you preview the revisions. But it also adds other functionality (Pending revisions), so maybe not the best solution.
Alright well this might not be ideal, but it works and was much simpler than I thought! I ended up just adding a $_GET parameter to the 2nd taxonomy terms’ linked url, so I could get the 2nd term from the other taxonomy on the next page through $_GET. On the next template I built … Read more
you may find your answer here and Here’s a demo of it. HTML code example <div class=”ccms_form_element cfdiv_custom” id=”style_container_div”> <label for=”brand”>Make:</label> <select size=”1″ id=”make” class=” validate[‘required’]” title=”” onChange=”updatepage();” type=”select” name=”style”> <option value=”-1″>–Choose a Make-</option> <option class=”Audio” value=”Audi”>Audi</option> <option class=”BMW” value=”BMW”>BMW</option> </select> <div class=”clear”></div><div id=”error-message-style”></div> <div id=”style-sub-1″ class=”BMW” style=”display: none;” name=”stylesub1″ onchange=”ChangeDropdowns(this.value)”> <label for=”brand”>Model:</label> <select name=”cat” … Read more
There is no filter in PHP, so we have to use JavaScript: add_action( ‘admin_footer-index.php’, ‘wpse_82132_hide_rows’ ); function wpse_82132_hide_rows() { $rows = array ( # ‘posts’, # ‘pages’, ‘cats’, // meoww! ‘tags’, # ‘comments’, # ‘b_approved’, # ‘b-waiting’, # ‘b-spam’, ); $find = ‘.’ . join( ‘,.’, $rows ); ?> <script> jQuery( function( $ ) { … Read more
I ended up going with another approach. I check to see what the current user’s role is, then if the role is ‘author’, enqueued a CSS file to hide the sticky option’s checkbox. In the theme’s functions.php file: function hide_sticky_option($hook) { global $current_user; if(‘post.php’== $hook || ‘post-new.php’==$hook){ $role = array_shift($current_user->roles); //get role of current user … Read more
sql select for post_title and a term name
This should work, but I didn’t have the time to test it. $query = new WP_Query( array( ‘meta_key’ => ‘_hit-counter’, ‘meta_value’ => ‘1000’, ‘meta_compare’ => ‘>=’, ‘orderby’ => ‘date’ ) );
Set per_page to 5 and page to 1 in wp_list_comments http://codex.wordpress.org/Function_Reference/wp_list_comments Then add your read more link just below your comments to reload the page with per_page and page not set. You can do this with AJAX for smoothness.
The add_attachment action is called after the attachment has been named. If you only want to change the name of the attachment (and the slug), you don’t need to change the name of the file and can just replace the code inside rename_attachment with a call to wp_update_post. add_action(‘add_attachment’, ‘rename_attacment’); function rename_attacment($post_ID){ $new_attachment_name = array( … Read more
The default category is stored in the options table under option named default_category , so you can do something like this: add_action(‘admin_init’,’set_user_default_cat_wpa89057′); function set_user_default_cat_wpa89057(){ global $current_user; if ( isset($current_user) ) { update_option( ‘default_category’, $current_user->user_login); } }