Nunchuck
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Question on PHP Query1. I did some more reading and now know that ‘Conference’ and ‘security’ are custom taxonomy. They are located under Events – Event Categories
2. The file I have been editing is taxonomy-type.php
3. Anything with tribe_ is a custom field from The Event Calendar plugin. The categories for events are not hierarchical. They are siblings.
The site I am working on was set up by someone else so I am trying to understand what they did and make changes to it.
Forum: Fixing WordPress
In reply to: Question on PHP QueryAgain, thank you. I have been trying to figure this out all week. I am new to WordPress so I still don’t know all the terminology but I believe that ‘tribe_events_cat’ and ‘eventDisplay’ are both custom taxonomy.
This block of code returned one upcoming event that is in ‘security’ and ‘Conference’:
<? $wp_query = new WP_Query( array( 'post_type' => tribe_events, 'posts_per_page' => 50, 'tribe_events_cat' => 'security', )); ?>
This is the whole block of code that I started with:
<?php $wp_query = new WP_Query( 'post_type=tribe_events&eventDisplay=past&posts_per_page=-1=&tribe_events_cat=security&tribe_events_cat!=Conference'); ?> <?php if ( $wp_query->have_posts() ) : ?> <?php /* The loop */ ?> <h1>Security Events:</h1> <?php while ($wp_query->have_posts() ) : $wp_query->the_post(); ?> <?php get_template_part( 'loop', 'index-event' ); ?> <?php endwhile; ?> <?php org_paging_nav(); ?> <?php else : ?> <?php _e( 'No results found', 'org' ); ?> <?php endif; ?>
Forum: Fixing WordPress
In reply to: Question on PHP QueryThank you for the response I tried that code and it returned “No results found”. Am I going about this the wrong way? This is my first time working with WordPress and I don’t understand why it’s so hard to get events to show up on category pages.