• derek

    What would be the best way to integrate a “sidebar” of short posts into my WP blog? In my case, I am interested in posting capsule film reviews, and having the 10 most recent appear along the edge of the blog. I can see other uses for this as well, such as annotated or temporary link lists. I’d like to have a category whose posts would only display in the sidebar, and not in the main posts list.
    This is not at all an original idea; I’ve seen many implementations. Because of this, I was hoping it had already been done (either within WP or as a hack) and I just need someone to point it out to me! I assume I’m just using the wrong keywords in my searches…
    Thanks.

Viewing 13 replies - 1 through 13 (of 13 total)
  • wujimon

    (@wujimon)

    I am also interested in something like this as it was one of the nice things I had going on MT. The way I did it in MT was to just create a new weblog and then do an “include” in one of my sidebars. This way I could organize my links in categories and such.. hmm.. perhaps I should just give that a try and see if it work with WP the way it is now.

    willm

    (@willm)

    It does sound like this is something you need multiple weblog support for, and WordPress may have that one day in the future, but if you want this functionality now you’re probably best off with MT or b2evo.

    TechGnome

    (@techgnome)

    It’s not as difficult as one might think.
    Try this:
    1) Copy index.php, and rename it to something like “sideblog.php”
    2) Open index.php. Right after the line $blog = 1; add this:
    $cat=”-X”; where X is the category you don’t want to show on the main page.
    I have $cat = “-2”; in mine and categopry #2 is excluded from the list.
    3) Save it, you’re done with that.
    4) Open sideblog.php. Again, right after the $blog = 1; line add this:
    $cat = “X”; Where X is the category id of the posts you want shown.
    5) Save it.
    6) Ok, now here’s the “fun part”. Make a CSS file for the sideblog. IF it’s going to be in the side bar, then you’ll proly want to make it simple and w/o using any graphics. Save it as sideblog.css
    7) In sideblog.php, change the stylesheet reference to the sideblog.css file created in step 6.
    8) Save everything.
    9) Optional step – edit the sideblog.php file to include or exclue things you want / don’t want. This would be links, posts, comments, or other menu items.
    10) Upload it to your server.
    11) NAvigate to https://www.yoursite.com/sidblog.php
    12) After the page comes up, drak the icon in the address bar to your links bar/folder, whatever and drop it. In FF, you can then set the properties of the bookmark to “Open in Sidebar”… I’m sure there’s a way to do that in IE as well, but have no idea how.
    TG

    Thread Starter Anonymous

    Cheers, Techgnome. This looks like a start. But I could use just a bit more clarification (I’m a near-clueless PHP newbie). Two issues:
    First, when I open my sideblog.php alone in the browser, it looks great, and only displays posts from the single chosen category. However, when I do the include (just a php include ('sideblog.php');), the sideblog displays the same posts as the main page (that is, all of them EXCEPT those from the intended category).
    The other issue is that adding the cat$="-cat#" to my index.php results in the index page title being changed to “my title >> my hidden category name”.
    Thanks for your thoughts so far!

    Thread Starter Anonymous

    No success here. Has anyone else experimented with Techgnome’s instructions?

    TechGnome

    (@techgnome)

    derek – yeah, the title thing is a bug… thought it had been fixed… actually it had been fixed, but then sub-cats were introduced….. I never looked to see if it had been fixed or not….
    Also, note: using $cat = “-X”; will/should exclude from that category. If you want to display ONLY that category, then it’s $cat = “X”;
    TG

    Thread Starter Anonymous

    I finally got around to testing this with a nightly build (7/3), and wanted to report that I’ve still had no luck. The title bug remains — but it’s not a huge issue for me. I wouldn’t mind stripping out the dynamic page titles.
    The other issue — that the “include” somehow overrides the restricted category settings of the sidebar.php file, as I described above — remains. The result is that the sidebar displays the exact same set of posts as the main blog — that is, all posts except those from the sidebar category.
    So, a few questions:
    Does anyone have a working implementation of the above strategy? If so, I’d love to take a look.
    Have any new “annotated links” or miniblog solutions been developed, which I’ve overlooked in my forum searching? I’ve been looking for an additional bare-bones blog system that I could use as a PHP include, but that seems like a kludge, and will double administration and posting complexity. Maybe that’s the only option at this point, though.
    Cheers -derek

    Ahhh… after reading https://www.ads-software.com/support/3/3264, I realize that there are multiple definitions of sidebar. And I reread Techgnome’s post in this light, and it makes more sense to me now. These instructions will put a miniblog in the BROWSER sidebar. D’oh!
    What I am actually trying to do is add a sidebar blog as a column along my main blog in index.php. Something (technically) along the lines of the “Guest Blog” at boingboing.
    Apologies to anyone else I confused in my dazed state. ??

    Thread Starter Anonymous

    I did the $cat = -24 thing for my main page (i don’t want a side blog, but a separate page instead), and it takes forever to load the page. If I get rid of the line, however, it loads the page just fine… Any help?

    Thread Starter Anonymous

    And then, that also screws up category display…

    • <?php _e(“Links:”); ?>
      <?php get_links(-1, ‘

    • ‘, ‘
    • ‘, ‘ ‘, false, ‘_id’, true, 0, 4, 0); ?>

    That code displays a list of four of the most recent links, without images or ratings. Use the Links tab in your admin panel to add, remove or edit the links this function calls.

    Oops.

      <?php get_links(-1, '

    • ', '
    • ', ' ', false, '_id', true, 0, 4, 0); ?>

    Thread Starter Anonymous

    How did we get from categories to links?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘sidebar minblog’ is closed to new replies.