Eds. Note: DailyDeli Category banned from home page, Permalinks Enabled

For a couple of months i wanted to remove the DailyDeli Entries from the main index page. Although i and maybe also you deem them relevant for searching and “What I’m up to purposes” they just cluttered the index page. Doesn’t look nice if you have 10 DailyDeli posts followed by a “real” post.

So i finally settled on doing it. Fortunately there is already a plugin for that purpose called catvis. Unfortunately some people mention that it might cause problems with WP2.2+. And indeed it does. After unchecking the box for showing the DailyDeli on the front page everything seemed fine at first, there where problems while displaying the single post pages.

The error message clearly showed that there where unbalanced parantheses in the generated SQL-Code. Easy to fix i thought. Hence i changed:

elseif (is_single()) // add permalink check (eff beta 10, thanks to ruralmoon)
$ret .= " AND (($cat_visibility.archives=1 AND $lc";

into

elseif (is_single()) // add permalink check (eff beta 10, thanks to ruralmoon)
$ret .= "AND (($cat_visibility.archives='$checkval' AND $lc)";

If you still find any erros, please report them and i may have a closer look at the plugin code. But since i’m not a PHP guide (and don’t want to become one, i try to avoid this.
matching the code for some other cases. But then wordpress complained about the DB-table not being there.

WordPress database error: [Unknown table 'wp_catt_visibility' in where clause]
SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND ID = 278 AND (post_type = 'post') AND ((wp_catt_visibility.archives='1' AND wp_catt_visibility.cv_user_level<='10') OR post_type='page' OR wp_catt_visibility.catt_ID IS NULL) ORDER BY post_date DESC

and

WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY post_date ASC LIMIT 1' at line 1]
SELECT ID, post_title FROM wp_posts WHERE post_date > '' AND post_type = 'post' AND post_status = 'publish' AND ID != ORDER BY post_date ASC LIMIT 1

Whereas the DB-Table wp_catt_visibility is definitely defined in DB, the second error clearly exposes an error in the SQL-Code. Since i figured that i never would need the ability to hide a single post i just uncommented it ending up with:

elseif (is_single()) // add permalink check (eff beta 10, thanks to ruralmoon)
// GK: do nothing because of WP complaining about the statement below
$ret .= "";
//GK: fixed unbalanced parantheses
//$ret .= "AND (($cat_visibility.archives='$checkval' AND $lc)";

In related news, i also finally enabled permalinks (after checking that the old unrewritten links still work

If your still experience any problems with this site problems please report them to me.