Exclude post format from get_posts

You just need to set the operator parameter to ‘NOT IN’ (see Codex on tax queries). Untested, but for your purposes: $args = array( ‘post_type’=> ‘post’, ‘post_status’ => ‘publish’, ‘order’ => ‘DESC’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘post_format’, ‘field’ => ‘slug’, ‘terms’ => array( ‘post-format-aside’ ), ‘operator’ => ‘NOT IN’ ) ) );

Is it possible to filter the display name for post formats for display in the Formats meta box?

Yes, you can. You can hook right into gettext. The example provided below changes Publish button: add_filter( ‘gettext’, ‘binda_change_publish_button’, 10, 2 ); function binda_change_publish_button( $translation, $text ) { //check if this is pizza add or edit page in administration global $pagenow, $typenow; if ( is_admin() && ( $pagenow == ‘post-new.php’ or $pagenow == ‘post.php’ ) … Read more

How can I add a filter to a particular post format?

Use get_post_format(): function test_filter($content) { $format = get_post_format(); if ( ! $format ) return $content; if ( ‘audio’ === $format ) // do something with audio if ( ‘aside’ === $format ) // do something with aside return “$content <hr>post format: $format”; } Since the_content() requires a global $post object to work, get_post_format() will always … Read more

Formatting Standard Post Format

Technically speaking, there is no “standard” Post Format. Rather, “standard” is simply the default – as in, no Post Format type is defined. If no Post Format type is defined, get_post_format() simply returns null. I would suggest re-factoring your code above, and re-naming your icon images using the exact Post Format string. That way, you … Read more

Is There a Difference Between Taxonomies and Categories?

Taxonomies, as previously described are a collective noun for the following category post_tag post_format link_category custom taxonomy The first four are built-in taxonomies, while custom taxonomies are taxonomies that are manually created by the user with register_taxonomy. Custom Taxonomies can be hierarchical (like the build-in taxonomy category) or not (like post tags) The categories and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)