• I know this issue has been kicked around here somewhat, but 1.5 is blowing my mind, and I’m confused by most of the responses I see… Ag, here’s my tale of woe, help if you’d like:

    I’m working on this site: https://www.danielchafinbryant.com — I’ve been pressed for time, so I’m using out-of-the box stuff as much as possible. This is my first foray into 1.5, and I’m a bit lost.

    I’d like him to be able to post “devotionals” (cat 6) to a different section of the site, so they won’t get confused with normal news, announcements, etc. on the front page. To that end, I *didn’t* want cat 6 to show up on the front page.

    This is where the confusion kicked in…I read post after post, and the wiki stuff about categories, tags, etc., and nothing seemed to nail it down for me.

    FINALLY, I grabbed Keith MacDuffee’s Category Visibility plugin, and that seemed to solve my first problem beautifully — one checkbox, and no cat 6 on the front page.

    Then, I thought I’d give the category template pages a try, so I made a category-6.php page, and added a link to my header section to https://danielchafinbryant.com/?cat=6, thinking it was as simple as that.

    You folks who know stuff can probably see this coming, but I agonized over this for a while: when I followed the link, it was pulling up the category-6.php template, but no posts were found. I *knew* there were posts! Rrgh.

    Then, I realized — the Category Visibility plugin was BLOCKING cat 6 from showing up on that page. The circle was complete, er, or something.

    SO, I’m back at square 1. Could someone, speaking to me as if I were a small child, show me how to make a single page that only displays cat 6, and nothing else?

Viewing 9 replies - 1 through 9 (of 9 total)
  • What you can do how ever is use the Category Visibility plugin AND RunPHP my Mark Summerville and fiddle arround with PH P and SQL if you know how to ?? Seems to me that you can fiddle with that stuff ???

    Thread Starter Jeff

    (@jmf)

    Sorry…that title was supposed to begin with “All I want is…” — it was a cry of anguish, not a childish demand, as it comes across now. ??

    Thread Starter Jeff

    (@jmf)

    Mmm. It’s the fiddling around that’s killing me; do you mean use runPHP to haul the posts out of the database that I want?

    I’m hoping there’s some more elegant way to do tht with WP itself, and I’m just overlooking/not comprehending…

    The implication of your q is that the front page is going to operate differently
    from the rest. So. The simple solution is to save index.php as home.php. That will be the front page. Now exclude cat 6 from the loop.

    Put this in right after the loop starts.
    <?php if ( !(in_category('6')) ) { ?>

    Just before the endwhile else if malarkey put in

    <?php } ?>

    No plugins needed.

    Thread Starter Jeff

    (@jmf)

    Sheesh. That did the trick, no problems. I *thought* I had tried something like that starting out, but I must have been doing it wrong. I’m set now, though. Thanks!

    Nothing fancy ??

    I had a similar issue with a blog I was setting up and did pretty much the same JMF did and realised I’d have to exclude the category from within the loop and used the exact same code Root gives above. My problem now is that though I’m happy with the solution, I’d like to have Previous/Next links and using the category exclusion code breaks it.

    So…yeah, I’m kind of hoping someone else might have a solution to this which I don’t know of yet. Many thanks in advance, I’ve gotten nothing but excellent support from these forums and its community. ??

    Is it possible to loop more than one category like

    <?php if ( !(in_category(‘6,4,3,7’)) ) { ?>

    i tried this but i didnt work.

    Should be, just your code is a little off. Just do:

    <?php if (
    !((in_category(‘6’)) ||
    (in_category(‘4’)) ||
    (in_category(‘3’)) ||
    (in_category(‘7’)))
    ) { ?>

    i.e. not in 6 or 4 or 3 or 7.

    If you just want to show one category, do:

    <?php if (in_category(‘6’)) { ?>

    Hopefully this is clearer than mud.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘I want a single category displayed on a separate page.’ is closed to new replies.