Need help with major category and permalink re-organization
The canonical code within WordPress should actually already redirect those old posts to the new posts automatically. Have you tested that?
The canonical code within WordPress should actually already redirect those old posts to the new posts automatically. Have you tested that?
You can’t have / as category and tags base, at least not without using a plugin like this one: http://wordpress.org/extend/plugins/fv-top-level-cats/ Doing it for both tags and categories seems almost impossible to me though.
Quantity of queries isn’t the only measure of performance, an individual query can cost more than numerous simple queries. The cost of (small query) x12 < cost of large query x1 + string/array manipulation You would be better doing the 12 individual queries. If it is costly, store the result in a transient for a … Read more
You directly cannot pass the name or slug for excluding a particular category. You have to use the id. Modifying your code: <?php $category_id = get_cat_ID(‘featured’); //if get_query_var(‘paged’) doesn’t work, then try using get_query_var(‘page’) in the next line. $paged = (get_query_var(‘paged’))?get_query_var(‘paged’):1; $q = array(); $q[‘category__not_in’] = array($category_id); $q[‘paged’] = $paged; query_posts($q); if (have_posts()) : while … Read more
after some trials I’ve got one solution that seems to be good but I need some tweaking help <ul class=”list-ensemble”> <?php $terms = get_terms(“production_co_type”); $count = count($terms); if ( $count > 0 ){ echo “<ul>”; foreach ( $terms as $term ) { echo ‘<li class=”title”>’ . $term->name . ‘</li>’; $args = array ( ‘post-type’=> ‘shows’, … Read more
Rather than trying to fit complex structure into categories, you should look into creating appropriate custom taxonomies, which will give you flexible querying with taxonomy parameters.
What you’re looking for is best achieved using a custom query: $top = new WP_Query( array( ‘category’ => ‘YOUR_CATEGORY_SLUG’, ‘orderby’ => ‘post_date’, ‘order’ => ‘DESC’, ‘posts_per_page’ => 1 ) ); if( $top->have_posts() ) { $top->the_post(); // Do things as if we were in the loop… } By default, sticky posts are brought to the top … Read more
you are storing the value into a variable you need to use get_bloginfo(‘url’) http://codex.wordpress.org/Function_Reference/get_bloginfo
Use a ‘difficulty’ custom taxonomy. The only thing is that you’ll have to roll your own metabox that allows you to choose a single term.
update_user_meta() is what should assist you in doing this. Feed what get_users() returns and update the meta data for each and every one of them with the required values. Assuming that you are going to store a serialized array, your custom query will have to unserialize each result in order to perform a search. I … Read more