Redirect to another page using contact form 7? [closed]

Redirect to another page using contact form 7? [closed]

Custom Taxonomy with tax_query

From the WordPress codex for wp_query: Display posts tagged with bob, under ‘people’ custom taxonomy: $args = array( ‘post_type’ => ‘post’, ‘people’ => ‘bob’ ); $query = new WP_Query( $args ); Display posts tagged with bob, under ‘people’ custom taxonomy, using tax_query: $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘people’, … Read more

Custom Post type category pages template and loop

You may alter the main query before the loop, but it’s crucial to reset the main query afterwards. Otherwise you’ll probably run into problems elsewhere. Disclaimer: Doing this is officially discouraged by WordPress here. However, in my experience it works perfectly to achieve the behaviour you want. Just don’t forget to add wp_reset_query(); after closing … Read more

Custom taxonomy template for categories

Your terminology is a bit scrambled here. A custom taxonomy is a taxonomy which you manually register through register_taxonomy. In your case that is ait-dir-item-category. Any “category” (as you call it) you create in your custom taxonomy is called a term. In this case events. To create a custom page for events, you need to … Read more

Get posts under a category with SQL

SELECT p.ID AS postId, p.post_name, p.post_title, p.post_content, p.post_excerpt, p.post_status, p.post_type, p.post_author, p.guid, p.post_modified_gmt, (SELECT group_concat(t.name SEPARATOR ‘, ‘) FROM wp_terms t LEFT JOIN wp_term_taxonomy tt ON t.term_id = tt.term_id LEFT JOIN wp_term_relationships tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy = ‘category’ AND p.ID = tr.object_id ) AS category FROM `wp_posts` AS p LEFT JOIN `wp_term_relationships` … Read more

How do I apply style to each category of a list?

I’ve modified your code to reflect the wp_list_categories() function reference as suggested by @Usce. This snippet will create an unordered list, remove the “Categories” list title, and add the li class with individual category ID so you can target each link in the list. function catting ($atts, $content = null) { echo ‘<div id=”cats” class=”catting”>’ … Read more