Support » Plugins » display “link only” posts differently

  • I’ve created code to display short link-based posts differently that long blog posts, and have them not count in your post limit numbers. Yay. Like kottke.
    Can view example here.
    I’m going to clean-up and package the code nicely sometime in the next few days. Feedback welcome.

Viewing 8 replies - 1 through 8 (of 8 total)
  • kinda like Matt’s Asides?

    uhhh…maybe? have a link to that? I swear I looked for something like this. Perhaps not hard enough…

    Well, there is room for two “shorties” in this arena, Matt’s does count towards post limit:
    You can see how he has it implemented (I also have it on my site)

    Yeah, almost exactly like that. I’m sure we do it almost exactly the same, as well. The part that required thought was how to not make the short links / asides not count towards your post limit.

    slapped it in the wiki:

    Currently I have a couple ugly hacks in place to enable my sidebar. I am using (and mangeling) Matt’s Asides by changing the “If” statement from his loop<?php if ($posts) { foreach($posts as $post) { start_wp(); ?>
    <?php if (in_category(2) && !$single ) { //code below is for link post ?>
    <?php } else { // code below prints normal posts (without excluded links category) ?>
    AND I have a second loop taken from 2fargons method (and using his improved functions.php) in the sidebar <?php $posts = get_posts('order=ASC&category=2&orderby=name&offset=0&numberposts=4'); foreach ($posts as $post) : start_wp()?>
    This is ugly and ineffeciant and doesn’t get me quite the results I want because “Aside” posts out of order and counted against the total. I tried to use this plugin to fix that, but it was skipping a normal post which should have been published (maybe becuase I had 2 Asides on the same day?). If anyone can explain why this was happening, or point out a way to improve my current hack I’d be very happy.

    There was a problem with a couple intermediate posts being skipped so now the end of line 106 of the plugin reads ("numberposts=$left"). This may also cause trouble, though ATM everything seems OK.

    I cannot get those two posts to appear on the main page. I think that this is because there are a couple deleted posts that are throwing off the backfill function (but I could be wrong). Assuming I am correct, you need to count gap between legetimate posts and adjust the backfill offset accordingly. In any event I am leaving my setup as is but can’t recommend it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘display “link only” posts differently’ is closed to new replies.