• Is there a way to make some categories visible by default, and others only visible via a link? I am not talking about totally hidden or private categories.

    What I want is for a visitor to only see, say, the General category and not the Special category on hitting the site for the first time. Then they can click on the Special category and read the posts in that….

    ISTR a blog that worked this way, but I can’t find it…

    TIA,

    –Yan

Viewing 6 replies - 1 through 6 (of 6 total)
  • Maybe this will point you in the right direction: http://codex.ww.wp.xz.cn/Template_Tags/wp_list_cats

    Thread Starter cptdondo

    (@cptdondo)

    I probably wasn’t clear in my original post – I am looking for a way to only show *posts* from some default categories… Trying to reduce the clutter on the main blog page….

    I want visitors to see posts from two categories only in the default view, and then have one or two more categories that they have to click on to see the posts from those categories….

    I’ll fish through my template to see how the posts are shown….

    There are plugins that can go this, and I think it can also be done with a query in the loop, but I don’t know how that works. I use the Front Page Cats Plugin to do it on my site. It works great. You just tell it what category #s should show on the main page, and it does it.

    Thread Starter cptdondo

    (@cptdondo)

    OK, I get this:

    WordPress database error: [Not unique table/alias: ‘wp_post2cat’]
    SELECT COUNT(ID) FROM wp_posts /*index*/ LEFT JOIN wp_post2cat ON wp_posts.ID = wp_post2cat.post_id LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) WHERE 1=1 AND post_date_gmt <= ‘2005-08-15 15:50:59’ AND (post_status = “publish” OR post_author = 1 AND post_status != ‘draft’ AND post_status != ‘static’) AND (category_id != 0 AND category_id != 1 AND category_id != 2 AND category_id != 4 AND category_id != 5

    Apparently it doesn’t like something… Googling for this error reveals only one similar post for a different plugin, which alas doesn’t even activate on my system…..

    I don’t know enough of WP’s innards to figure out what it is complaining about – the SQL query seems fine…

    Thread Starter cptdondo

    (@cptdondo)

    OK, there is something wrong with the SQL query… I have a conflict between private_categories and front_page_categories….

    Anyone know of a plugin that provides both? (Save me some coding and headache… The mergin of the two doesn’t seem too trivial….)

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Default visible categories’ is closed to new replies.