“Duplicate” Posts Appearing Since 3.1.2 Update

are you using global $query_string; before the query? so that the full line looks like: <?php global $query_string; query_posts($query_string . ‘&cat=-10,-12’); ?> alternatively, you could try: <?php query_posts(‘cat=-10,-12&paged=’.get_query_var(‘paged’)); ?>

post categories

You could simply use the category pages WordPress generates using the category.php template, or category-{slug}.php. If you don’t like the /category/categoryname/ url format WP uses, there are a few plugins that remove the category base- I use Yoast SEO plugin for this, which gives you lots of other great features on top. Your other option … Read more

List custom taxonomy specific to one custom post type

Here’s an example that will list all the mobile_review posts that have the term htc_desire_hd in the taxonomy mobile_phone : $tax_query = array( ‘relation’ => ‘AND’ ); $tax_query[] = array( ‘taxonomy’ => ‘mobile_phone’, ‘terms’ => array(‘htc_desire_hd’), ‘field’ => ‘slug’ ); $args = array( ‘post_type’ => ‘mobile_review’, ‘tax_query’ => $tax_query ); $custom_loop = new WP_Query( $args … Read more

I can’t format text in th edit page (or posts) whats wrong..?

There are a few things that could cause the issue, or I should say a combination of things. With the formatting problems, you might have the “!important css” declaration overriding your CSS from the page/post editor. Here is an example: .post { font-family:Verdana, sans-serif; font-size:14px !important; } Or I want to add a break so … Read more

IP camera jpg stream to post

If you’re adding a post every few seconds, then you’d really spam your database. Adding an attachment (which is some type of post), is not really different, but more appreciated. Take a look at these functions. Just my 2 cents: I’d just display it according to the url, not download, save and add a post … Read more

How to Link to all posts that have the Standard Post Format

Put this in your function.php function akv3_query_format_standard($query) { if (isset($query->query_vars[‘post_format’]) && $query->query_vars[‘post_format’] == ‘post-format-standard’) { if (($post_formats = get_theme_support(‘post-formats’)) && is_array($post_formats[0]) && count($post_formats[0])) { $terms = array(); foreach ($post_formats[0] as $format) { $terms[] = ‘post-format-‘.$format; } $query->is_tax = null; unset($query->query_vars[‘post_format’]); unset($query->query_vars[‘taxonomy’]); unset($query->query_vars[‘term’]); unset($query->query[‘post_format’]); $query->set(‘tax_query’, array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘post_format’, ‘terms’ => $terms, … Read more