Tag Info

New answers tagged

0

This is pretty much what Foxsk8 mentioned in a comment, so credit should go to him, but these additional instructions will be useful. The WordPress plugin called TinyMCE Advanced will solve your problem. This plugin comes with an option inside Settings > TinyMCE Advanced that will fix your disappearing <p> tags. Mark the checkbox labeled Stop ...


0

The first line in the code is the culprit. It takes in current year and starts gathering posts from current year and goes into the past.


1

By default, get_terms will only return those tags that have some posts attached to them already. Try: $tags = get_terms( 'sizes', array( 'number' => 999, 'orderby' => 'count', 'order' => 'DESC', 'hide_empty' => false, ) ); The hide_empty parameter will override this behaviour. EDIT: I removed the 'taxonomy' parameter for ...


-1

As of the current version, the file in question appears to be "ajax-actions.php" and is located in wp-admin/includes.


0

You cannot natively query broadly by taxonomy, only by terms If you study through Taxonomy Parameters in Codex it is now pretty easy to construct conditions for multiple sets of terms required. Still it's not completely flexible, I won't know easy way to do things like “having any term in some taxonomy” on top of my head.


0

I think your idea is really nice here, but you have a couple of serious flaws in your code. Never use extract(), ever. It is extremely hard to debug and can render unexpected output. It has now been completely removed from core, except in one instance as far as I can pick up from this core trac ticket. The codex has also been updated to reflect this ...


0

Thank you @bueltge for the answer! I was focusing on the shortcode and didn't even think to call the function in the 'normal' way. echo dynamicContent() worked.


0

I've been successfully using the following code from @StephenHarris from this answer. I have made a small tweak or two to the original code, but the most significant is to name the new count object to count_type from the original COUNT* that was returned by default Just in short again, the function works exactly like you would normally use get_terms. There ...


0

I guess your custom user role does not have the required capability to assign terms, which in case of the post_tag taxonomy would be edit_post. So one thing to do would be giving it to your role—which is most likely not what you would like to do as this does not only affect assigning terms but also a number of other actions). Another thing you could ...


0

If anybody needs to do this too - I was able to achieve this with the following code; <?php $terms = wp_get_object_terms( $userid, 'user_sector' ); foreach($terms as $term) { echo '<div class="sector">'. $term->name.'</div>'; } ?>


0

Use 'tags_input' instead of 'post_tags'. See here in the notes: http://codex.wordpress.org/Function_Reference/wp_insert_post You could use wp_set_post_tags() function: http://codex.wordpress.org/Function_Reference/wp_set_post_tags


0

What tags/terms/taxons do you get? The the_tags( $before = null, $sep = ', ', $after = '' ) function is a wrapper for get_the_tag_list( $before = '', $sep = '', $after = '', $id = 0 ). This function applies the filter the_tags on the get_the_term_list( 0, 'post_tag', $before = '', $sep = '', $after = '' ) (0 is the $id and $post_tag the $taxonomy ...


2

As stated in a comment, your get_posts parameters are wrong. There is no such parameter as term_id. You should make use tag which uses the tag slugs as a string or tag__in which uses the tag ids in an array This will work $posts = get_posts('numberposts=6&tag='. $tags->slug); or this will work $posts = get_posts('numberposts=6&tag__in=' . ...



Top 50 recent answers are included