Pull Tags But Not as Links

You can use get_the_terms(). I’ve adapted the following from an example on that page: $terms = get_the_terms( $post->ID, ‘visits’ ); if ( $terms && ! is_wp_error( $terms ) ) : $visits_name = array(); foreach ( $terms as $term ) { $visits_name[] = $term->name; } $terms_list = join( “, “, $visits_name ); echo $terms_list; endif; EDIT: … Read more

Override Taxonomy Template

Take a look at the Codex: taxonomy-{taxonomy}-{term}.php – If the taxonomy were sometax, and taxonomy’s term were someterm WordPress would look for taxonomy-sometax-someterm.php. In the case of Post Formats, the taxonomy is ‘post_format’ and the terms are post-format-{format}. i.e. taxonomy-post_format-post-format-link.php taxonomy-{taxonomy}.php – If the taxonomy were sometax, WordPress would look for taxonomy-sometax.php taxonomy.php You registered … Read more

Show Custom Taxonomy title in loop

The name of the current taxonomy term is in the name property of the term object, so, in your loop just echo it: if( $posts->have_posts() ): while( $posts->have_posts() ) : $posts->the_post(); ?> <div class=”cat-preview”> <a href=”https://wordpress.stackexchange.com/questions/114323/<?php esc_url( the_permalink() ); ?>”><?php the_post_thumbnail (‘medium’); ?></a> <h2><?php echo $term->name; ?></h2> </div><?php endwhile; endif;

Display all posts that use a custom taxonomy

I think your problem is here: ‘terms’ => array($clients_terms->slug) You define $clients_terms like so: $clients_terms = get_terms(‘clients’); …which will return an array of objects. But you try to access it as an object in your query args. That should be producing some kind of PHP notice? (Trying to get property of non-object, or something?) Try … Read more

What is the most efficient way of implementing a notification system? [closed]

If you’re looking to get in to instant notifications without suffering from backlog, I’d looking in to both Node.js and Socket.io. You should be able to work with them both pretty easily and integrate w/ WordPress. The sample chat application on the Socket.io site isn’t a far cry from what you’d be doing. Basically an … Read more

Why cant I add a custom post type to a custom taxonomy?

The post_category you are using is for core categories taxonomy. For custom taxonomies you have to use tax_input. For example, the next code set terms for custom_tax_category and custom_ta_tag taxonomies. $args = array( ‘post_type’ => ‘custom_post_type’, ‘post_title’ => wp_strip_all_tags( $title ), ‘post_content’ => ‘some content’, ‘post_status’ => ‘publish’, ‘post_author’ => $author_id, ‘tax_input’ => array( ‘custom_tax_category’ … Read more

get_the_title() is returning results from previous loop

The issue, I believe, is that if ($stories) is always returning true, een if there are no posts. It’s then looping through the WP-Query elements, not the actual posts. Try this instead: if ( $stories->have_posts() ) { while ( $stories->have_posts() ) : $stories->the_post(); echo get_the_title( get_the_ID() ); endwhile; $query->reset_postdata(); }