Displaying Custom Fields on Post with Genesis Child Theme

How about instead of genesis_custom_field(‘instrument’); use: echo genesis_get_custom_field(‘instrument’); Plus the genesis_after_post_title action hook is deprecated since 1.7.0 and you should use genesis_entry_header with correct priorities. For more information please use the reference links below. Reference: genesis_after_post_title Genesis 2.0 Hooks reference

Custom Field sort not working (WP 3.8.1)

I think your query arguments are missing meta_key, which in this case should be ‘event-date’. You need it outside the meta query for orderby to work. Try this: $today = date(“Ymd”, strtotime(current_time(‘mysql’))); $args = array( “post_type” => “post”, “post_status” => “publish”, “posts_per_page” => -1, “cat” => 13, “meta_query” => array( array( “key” => “event-date”, ‘type’ … Read more

How loop through posts based on custom fields

To select posts that have a meta value, use the EXISTS comparison operator. $args = array( ‘post_type’ => ‘jobs’, ‘posts_per_page’ => 12, ‘paged’=> $paged, ‘tax_query’ => array( array( ‘taxonomy’ => ‘job_category’, ‘field’ => ‘slug’, ‘terms’ => $term->slug, ) ), ‘meta_query’ => array( array( ‘key’ => ‘_shop’, ‘compare’ => ‘EXISTS’ ) ) );

meta_key and meta_value not working together

You could try this: $args = array( ‘post_type’ => ‘cqpp_interventions’, ‘posts_per_page’ => ‘-1’, ‘meta_query’ => array( array( ‘key’ => ‘priority’, ‘value’ => ’80’ ) ) ); The real issue with your query is because you are passing meta_key and meta_value. However, the arrays in your meta_query argument should have the keys key and value instead. … Read more

What is better: Custom Fields vs Custom Taxonomies with Terms for perfomance, scalability and better user experience

Finally after the holidays I returned back to this question. I chose to use Custom Taxonomies instead of Custom Fields. Here is why: It’s faster to make different queries (even if I will not have many posts) Most of these attributes are reusable (shared) They may be changed/modified easily in the future I’m not going … Read more