WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar blog (7 posts)

  1. ByteWarrior
    Member
    Posted 10 years ago #

    I successfully made a sidebar blog (using this http://wordpress.org/support/3/2559 post). I have only one problem...
    After I added $cat="-15"; to my index.php, <b>all</b> my posts are shown on the front page. Now it takes about 10 seconds to load that page. In my options I have: posts per page = 5, so that isn't the problem...
    Does anyone know a solution for this? It's quite annoying :-s
    I'm using WordPress 1.0.1
    My blog: http://bytewarrior.madoka.be/b2
    My sideblog: http://bytewarrior.madoka.be/b2/sideblog.php

  2. ByteWarrior
    Member
    Posted 10 years ago #

    Okay, I found the solution!!
    I had to change the options from "Posts" to "Posts paged" (or something like that)

  3. ByteWarrior
    Member
    Posted 10 years ago #

    Now I'm having another problem... :?
    I used $cat='-15' in my index.php to exclude the sideblog category. But when someone clicks the permlink in the sideblog, they get

    Sorry, no posts matched your criteria.

    I know that's because of the exclusion of the category. I'm not a php guru, can someone help me out with a simple script??
    I tried this:
    if ($cat==15) {
    $blog='1';
    }
    else {
    $blog='1'; $cat='-15';
    }

    but that doesn't work... :-(

  4. Anonymous
    Unregistered
    Posted 10 years ago #

  5. Anonymous
    Unregistered
    Posted 10 years ago #

    Thanks for the link, but that's not my problem. I will try to be more specific. I have one category excluded (because it's in my sideblog), but when I click the links in the sideblog, it doesn't show that post (because all posts of that category are excluded). Now I want that when a link is clicked in de sideblog, that post shows up, but those post may not show up on the front page.
    That's why a need some sort of If ... then ... else.

  6. Anonymous
    Unregistered
    Posted 10 years ago #

    ByteWarrior, try this in your index (or hack file):
    if ('/' == $_SERVER['REQUEST_URI'] || '/index.php' == $_SERVER['REQUEST_URI']){ $cat = "-cat#"; }

  7. ByteWarrior
    Member
    Posted 10 years ago #

    It doesn't seem to work. Still the same problem. On the frontpage, all the categories do show up (except cat n°15, because that one is excluded). When I try to open a post from the sidebar, I get a "Sorry, no posts matched your criteria".
    I'm not a php-guru, but can you explain what the code about should do? Maybe I can figure it out then...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.