• Hi, I run b2/wordpress on my site, and have multiple pages each showing a single different category. The problem is that you have to set the “cat” variable in the POST string to get b2/wordpress to display the category, setting it within the php just results in a blank page.
    Is there any easy way to change this behavior, as i would like to protect these pages from easy modification. I have had a quick look through the code, but cannot find where the code relies on the POST version of the variable.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Richard,
    You can add $cat=2; to the top of each of your php pages *before* the require_once(‘blog.header.php’); line.
    That will force a specific category to be displayed.
    Note it may stop any links output from list_cats() working unless you specifiy a filename to that function. Similar precaution with the category link for each posting.
    Mike

    Thread Starter richardprice

    (@richardprice)

    Thanks, that works a treat, i wonder where i was sticking it before.

    Are there plans to allow $posts and $cat to work together so that you can display the $posts most recent entries in a single category? As it is, it seems $cat overrides $posts in the SQL call.

    Hi, I’m still using b2 for my neighborhood association’s website, using this method of seperating categories of posts (news, minutes/agenda, and resources, etc…) $cat=whatever; but I’m having problems with the search function and the <<previous next>> thing… It’s a mess.
    But now I’m thinking that I can still do this but have all this done from the archive page … then I could go ahead and switch over to WordPress… Please tell me this will work. 🙂
    Also, how many links will the link manager hold before it explodes–that would be a huge saver. 🙂
    You can see what it’s doing at http://trinitypark.org

    I saw a website that solved this problem using WP. I just wonder how much editing he had to do, (or which files he had to edit) to get the “WP engine” to run from several different directories. He’s got his index page loading in his root/main .. then he’s got his categories in seperate directories, then his archives are done the same way, monthly. On top of this, he’s got the last 5-10 posts lists.
    Wow. That’s what I have been looking for–at least I know it’s possible. Is there anyone that can explain how this is possible?
    John

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Getting Rid of the “Cat” POST variable’ is closed to new replies.