How to retrieve the post_id of a tag page?

A tag page would be like other archive pages in that a loop of posts would be displayed, even if only one post has been assigned that tag. You’re check for post ID needs to happen during the <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> loop.

How to list Tags using get_tags in an html table?

This is what I tried and it works well. I am using array_chunk, but I’m also adding a check to see if a chunk has less than 4 values (as you want 4 columns), then just add a blank <td>, which will avoid the mark up from breaking. <?php $tags = get_tags(array(‘hide_empty’ => false)); $tag_groups … Read more

How to make a Post Tag primary?

Looks like someone on on of my listserves provided the answer: He said to, “use innerHTML() within your ajax callback function. It looks like you’re using jquery, so use the .load() function.” I checked on the jquery site and it said .innerHTML is .html in jQuery, so we’ll go with that then and see if … Read more

How to include post count in this “get_tags” snippet

where exactly? example below is for the count getting shown in brackets after the tag name, outside the link: <?php $tags = get_tags(); if ($tags) { foreach ($tags as $tag) { echo ‘<li><a href=”‘ . get_tag_link( $tag->term_id ) . ‘” title=”‘ . sprintf( __( “View all posts in %s” ), $tag->name ) . ‘” ‘ … Read more

Create a separate widget for both Tags and TagsCloud?

we can create by category and we conver to custom category widget. There are a few plugins that are supposed to enable filtering tags for specific category. For example: TDO Tag Fixes and Sensitive Tags. //Getting Tags for a Specific Category <?php query_posts(‘cat=1&posts_per_page=-1’); if(have_posts()): while (have_posts()) : the_post(); $all_tag_objects = get_the_tags(); if($all_tag_objects){ foreach($all_tag_objects as $tag) … Read more

Tags Sorted By Characters?

You can use wp_get_post_terms to achieve this. The third argument for this function supports an orderby parameter which defaults to name i.e. to sort alphabetically by name $args = array(‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘fields’ => ‘all’); // orderby also supports ‘count’, ‘slug’, ‘term_group’, ‘term_order’, and ‘term_id’ The first 2 arguments of that function … Read more

HTML5 Summary tag in editor

You can use the $allowed_tags global. Add the following to your functions.php file. global $allowedtags; $allowedtags[‘summary’] = array(‘class’ => array()); Add more attributes within the array similar to the class element. You can learn more on Otto’s post here: