drhodes
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress Ordering posts in foreach statementAnybody?
Forum: Fixing WordPress
In reply to: adding multiple terms to the body classDang I was wrong. That’s not quite it yet. What you suggested adds all the terms to the body tag. I would like it to only return the terms that are checked. For example there is a list of terms available , term1, term2, term3. If term2 is checked then add it to the body class, but don’t add 1 and 3.
Forum: Fixing WordPress
In reply to: adding multiple terms to the body classThat did it. Thanks alchymyth!
Forum: Fixing WordPress
In reply to: Target and add class to element in if statement based on slugThanks again for your help.
I think I’ve done a poor job of describing what I’m trying to do. The in_category route seems to be on the right track, but I’m not using categories.
It’s a custom post type that doesn’t use categories. I have a taxonomy of Event Type with options of Webinar or Live-Event. Is there a way to do what you’ve done but for the taxonomy term of Webinar?Forum: Fixing WordPress
In reply to: Target and add class to element in if statement based on slugI messed with this for about an hour and can’t seem to figure it out. Care to share an example working off my scenario above?
Forum: Fixing WordPress
In reply to: Display posts by TaxonomyThis should do it.
$args = array(‘post_type’ => ‘yourposttype’, ‘league’ => ‘NFL’, ‘order’ => ‘ASC’);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
Forum: Fixing WordPress
In reply to: loop to grab category only on certain pageThat worked perfectly! Thank you very much.