Title: Sidebar blog
Last modified: August 18, 2016

---

# Sidebar blog

 *  [bytewarrior](https://wordpress.org/support/users/bytewarrior/)
 * (@bytewarrior)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/sidebar-blog/)
 * I successfully made a sidebar blog (using this [http://wordpress.org/support/3/2559](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](http://bytewarrior.madoka.be/b2)
   My sideblog: [http://bytewarrior.madoka.be/b2/sideblog.php](http://bytewarrior.madoka.be/b2/sideblog.php)

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

 *  Thread Starter [bytewarrior](https://wordpress.org/support/users/bytewarrior/)
 * (@bytewarrior)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/sidebar-blog/#post-39659)
 * Okay, I found the solution!!
    I had to change the options from “Posts” to “Posts
   paged” (or something like that)
 *  Thread Starter [bytewarrior](https://wordpress.org/support/users/bytewarrior/)
 * (@bytewarrior)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/sidebar-blog/#post-39693)
 * 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… 🙁
 *  Anonymous
 * [22 years, 3 months ago](https://wordpress.org/support/topic/sidebar-blog/#post-39700)
 * [http://wiki.wordpress.org/index.php/show-one-category-on-front-page](http://wiki.wordpress.org/index.php/show-one-category-on-front-page)
 *  Anonymous
 * [22 years, 3 months ago](https://wordpress.org/support/topic/sidebar-blog/#post-39769)
 * 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.
 *  Anonymous
 * [22 years, 2 months ago](https://wordpress.org/support/topic/sidebar-blog/#post-40020)
 * ByteWarrior, try this in your index (or hack file):
    if (‘/’ == $_SERVER[‘REQUEST_URI’]
   || ‘/index.php’ == $_SERVER[‘REQUEST_URI’]){ $cat = “-cat#”; }
 *  Thread Starter [bytewarrior](https://wordpress.org/support/users/bytewarrior/)
 * (@bytewarrior)
 * [22 years, 2 months ago](https://wordpress.org/support/topic/sidebar-blog/#post-40023)
 * 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…

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

The topic ‘Sidebar blog’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [bytewarrior](https://wordpress.org/support/users/bytewarrior/)
 * Last activity: [22 years, 2 months ago](https://wordpress.org/support/topic/sidebar-blog/#post-40023)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
