How to set post expiration date and time and move the page to archive after expiration [closed]
How to set post expiration date and time and move the page to archive after expiration [closed]
How to set post expiration date and time and move the page to archive after expiration [closed]
Don’t use a reserved variable as a GET (or POST) parameter, this won’t work.
<h2>Bathrooms</h2> <input type=”checkbox” name=”bathrooms_id[]” value=”bath_tub_id” /> Bath tub <input type=”checkbox” name=”bathrooms_id[]” value=”shower_id” /> Shower … <h2>Living Room</h2> <input type=”checkbox” name=”livingroom_id[]” value=”dining_table_id” /> Dining Table
You do not want to reference the global $post, but the post that is given to you as one of the argument. You simply need to remove global $post; Remember also to sanitize input and prefix function names. function wpse50651_filter_transition_post_status( $new_status, $old_status, $post ) { global $wpdb; $wpdb->query( $wpdb->prepare( “UPDATE my_table SET post_status=%s WHERE post_id=%d”, … Read more
Link button is not working while editing a post in Firefox [closed]
Display posts with comments closed, with pagination?
It is probably better to upgrade the old installation to a current wp version and reapply the changes. Unless it is a very big site you are probably going to waste more time in researching , coding and debugging an automatic solution then what it will take you to manually edit the posts.
I think your problem with pagination. Use this code and css. <?php function pagination($pages=””, $range = 4) { $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == ”) { global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages) { echo “<div class=\”pagination clearfix\”>”; if($paged > … Read more
You can refer this. Use the examples part. Inside the foreach loop put your all the code which needs to be repeated for each category type. something like: <?php $categories = get_the_category(); if($categories){ foreach($categories as $category) { $my_query = new WP_Query(‘cat=$category->term_id’); //code to display category posts goes here } } ?> You are ready to … Read more
For restricting the categories, maybe the plugin Restrict Categories can help. But it doesn’t have Multisite capabilities. Take a look at the filter list_terms_exclusions that it uses in the cat_filter function. But Role Scoper states that it has “Extensive WP-mu support”. May be worth a try. For the query part, take a look at this … Read more