Installing Adhesive
Posted in Blogging, Kiloblog, Software | Leave a Comment
This is a nice tool. Setup was not straightforward, however. It ruined my newly added asides.
I want to use sticky posts on the listings for particular tags, to create special sections like a portfolio. Looking for sticky post plugins lead to Adhesive. It is a nice plugin.
Setup was not straightforward, however. It ruined my newly implemented asides. Apparently, the function in_category no longer worked. Turns out the table of categories was not being built. I added this code right before the end of adhesive_the_posts.
$ids = array();
foreach ($posts as $post)
{
array_push($ids, $post->ID);
}
update_post_category_cache($ids);
return $posts;
I turned off the display of sticky articles at all places except for categories. I still want to use stickies with tags, so I added a condition to two conditionals in the adhesive.php file. They read like this.
function adhesive_posts_where($where)
{
if(!adhesive_get_options('category_only') || is_tag() || is_category())
$where = ' AND 0=1 ' . $where;
return $where;
}
The other function that needs a similar change is adhesive_the_posts.
Now I can create a sticky article to head up a portfolio page over at Blogometer.
2 Responses to “Installing Adhesive”
I tried installing adhesive and the “don’t display the date for sticky posts” feature didn’t work. Any thoughts?
Leave a Reply