For the new threeformed site I am using Wordpress as a light CMS, so I wanted to treat some ’special’ posts differently than others based on their category. This meant that i’d have to exclude these ’special’ posts from a few places, one of these places was the tag cloud.
Hmmm, I can only exclude tags from
wp_tag_cloud()
based on ID’s? So that seemed easy enough right?! I could just use
get_the_tag_ids('exclude=special')
… Well if that function existed. Well it does now!
// Gets tags ID's for current post
function get_the_tag_ids($which, $delimiter) {
// Gets posts for the category
query_posts('category_name='.$which);
// Loop through each post with $which category
while(have_posts()) {
the_post();
// Get the tags for each post
$this_post_tags = get_the_tags();
// if there are tags
if ($this_post_tags) {
// Get the tag ID for each
foreach($this_post_tags as $tag) {
$taxarray = is_term($tag->name, 'post_tag');
$post_tags .= $taxarray[term_id].$delimiter;
}
}
}
wp_reset_query(); // Resets the query
return $post_tags;
}
get_the_tag_ids('special',',')
8,3,9,8,12
jScrollHorizontalPane is a plugin based off of Kevin Luck’s jScrollPane which override’s the browsers…
I was finishing up some tedious work around midnight a few days ago and decided I needed to code something fun. I have…
For the new threeformed site I am using Wordpress as a light CMS, so I wanted to treat some ’special’ posts d…
This is a simple jQuery plugin used to create a horizontal or vertical clicking scroll menu. It’s lightweight, s…