WordPress.org

Forums

Recent Posts (11 posts)

  1. Slappo
    Member
    Posted 10 years ago #

    How do you put a bullet or other text BEFORE each post in the recent posts (or recent comments) hack. When the recent posts are returned on the page, they look like they are all running together, and I wanted a way to differentiate them with a bullet or something like that.
    Thanks!

  2. stravaiger
    Member
    Posted 10 years ago #

    I stuck <hr width="100%"/> at the end of each excerpt but then again I modified the template to only display the excerpt of a story rather than the full story. You get the full story when you click on the title.
    To add bullets to the title of each story, modify index.php:
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">

    • <?php the_title(); ?>

    </h3>
    Alistair

  3. Slappo
    Member
    Posted 10 years ago #

    I just wanted bullets or <i>something</i> to separate the recent posts. Otherwise, they all run together...But I found what I needed to do.
    Change the code that Nick has you put in your index.php file from this:
    <?php get_recent_posts(10, '', '
    ', true, 5); ?>
    to:
    <?php get_recent_posts(10, '• ', '
    ', true, 5); ?>
    or, put whatever text there you want.

  4. Beel
    Member
    Posted 10 years ago #

    Well, it looks fine but it isn't semantically correct, and is not, as your button states, "XHTML Valid". IF you want to eventually have your page validate, follow my suggestion above.

  5. Slappo
    Member
    Posted 10 years ago #

    I think my new XHTML validation problems are mostly from the CG-Amazon plugin. Before the page was fine. *Sigh*. That's yet another thing to fix...but I don't know how I'm going to fix it. It's a big plugin.

  6. Beel
    Member
    Posted 10 years ago #

    No, it is not cg-amazon - Dave, with just a bit of help from me, has gone to great lengths to ensure it validates. The problem with how you are using it and Recent Posts is you have an unordered list followed by links with
    's. That is not valid XHTML. As I said before, try my suggestion above for Recent Posts.
    I have CG-Amazon on my site and it validates just fine. How do you have it called (including wrapping tags) in your index page?

  7. Slappo
    Member
    Posted 10 years ago #

    OK, I've got another question...How do I deal with ampersands in the actual permalink title...
    Let's say the name of my post was A & B. When the page converts to HTML and show up on my main blog page, it looks fine but in the XHTML the & becomes an undefined string, and now I get XHTML errors. How do you correct the hack so that ampersands can be converted to & for XHTML purposes.

  8. Slappo
    Member
    Posted 10 years ago #

    Forget that last question, I figured it out...just add the .htmlspecialchars before the actual $post_title in addition to the permalink...
    I'm still getting cg-amazon related html errors...but less of them...and your fix for recent posts works (obviously).
    So, you can't pass the variables in the
    <?php get_recent_posts(); ?>
    code? You have to modify the hack?
    Please, can you take a look at my page and tell me what the heck is going wrong? Maybe its a css thing, but I don't think so. I don't have any more
    anywhere...

  9. FerN
    Member
    Posted 10 years ago #

    Hi, you guys,
    It really sounds greek to me. I am trying to show recent posts in the ritght side of the blog. Just under, let's say, categories.
    I downloaded the hack, and activate it. But I don't know how to go on now. I don't know how to move, swap, delete, or add blocks on the right side.
    Let's say that I am completely new to WP, and I have no clue of php, css, etc. Could you please give me an easy way (I would be grateful to death...)
    FerN.

  10. Beel
    Member
    Posted 10 years ago #

    I answered what to add to the menu above:
    http://wordpress.org/support/10/8088#post-6
    stravaiger - If you happen to pass this way again, could you fix your post above so we can get this thread straightened out (use backticks for your code)?

  11. FerN
    Member
    Posted 10 years ago #

    Thanks, Beel,
    I was not sure, sorry for being newbie. It is working now (in Spanish but it works...)
    http://www.perplejismos.com.
    The more you have, the more you want... As I have no idea (I can only edit by copypasting), I am not sure if it would be easy to have the list the other way around (like powerpoint, but without the bullets). I.e.:
    ---
    This is a post title, and when the line breaks
    you have an extra margin...
    ---
    It seems more legible to me.
    Thanks again,
    FerN.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.