• DJDB

    (@djdb)


    Hi there,

    i’m running my blog on wordpress and i’m looking for a specific kind of plugin: i want to show 10-15 posts on the main page. The first 5 as i have set them to be (with with a line break and a “read more” link where i need it to be) and just the title and the link for the next 5-10.

    I have found a plugin that could work (don’t remember it’s name right now), but it showed full text for the first posts. I want them to be with my line break and only title for the rest.

    Is there a plugin for that?

    Thanks in advance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • vtxyzzy

    (@vtxyzzy)

    I don’t know of a plugin that will do that, but it shouldn’t be too hard to modify your index.php file. If you are using a free theme, I would be glad to take a look.

    Do you want the same pattern of posts on the second and following pages, or just on the first page? If different, what do you want on the pages after the first?

    Thread Starter DJDB

    (@djdb)

    My blog is on djdb.me, i’m using the Oulipo theme.

    Same pattern for first page and every other page (including categories etc), would be great!

    (Thanks for your response).

    vtxyzzy

    (@vtxyzzy)

    You should be able to do what you want by inserting one line of code in each of your template files (index.php, page.php, and single.php).

    Change this:

    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
             <p class="date"><?php the_time('F jS, Y') ?> <?php comments_popup_link('&sect; <span class="commentcount">0</span>', '&sect; <span class="commentcount">1</span>', '&sect; <span class="commentcount">%</span>'); ?></p>

    to this:

    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
             <?php if (++$counter > 5) continue; ?>
             <p class="date"><?php the_time('F jS, Y') ?> <?php comments_popup_link('&sect; <span class="commentcount">0</span>', '&sect; <span class="commentcount">1</span>', '&sect; <span class="commentcount">%</span>'); ?></p>
    Thread Starter DJDB

    (@djdb)

    Thank you, that ALMOST works. But, it breaks the right sidebar on my main page and it puts a “); ?>” after every post title. Have a look on djdb.me.

    Thread Starter DJDB

    (@djdb)

    Fixed the “); ?>” problem by removing some info, but can’t do anything for the sidebar..

    vtxyzzy

    (@vtxyzzy)

    Don’t know why that didn’t work. Please put in the change and post the code in the pastebin.

    Then, post the link to it here so I can have a look.

    Thread Starter DJDB

    (@djdb)

    After some experimenting (thanks you the code you provided above) i decided to leave my blog as it is for now.

    Thanks for your help!

    (and sorry for my late response).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Only title/link for last posts on blog’s main page’ is closed to new replies.