• Hi, does anyone know the HTML code that I can insert into the sidebar for the “Latest Posts” thing? Don’t tell me to use the widget either. (I don’t feel like explaining why.)

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • well, html won’t do. ya need some good ol’ php.
    here’s a link to what ya need in the codex.

    Thread Starter insaneelf

    (@insaneelf)

    So there’s no code for the actual widget itself? One that I could just enter into the sidebar file? My knowledge of php is…lacking. :S I would use widgets, but for some reason, when I drag and drop them, they don’t work…I even had them working before, until I reworked my sidebar file.

    ahhhh. you said a mouthful. You reworked your sidebar.
    If your sidebar doesn’t have the right command, widgets won’t work for squat. Possibly you deleted some part or all of that command when you reworked the sidebar.

    This might work:

    Open your sidebar.php and look for something like this:


    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar() ) : ?>

    Should be at the top. Also, at the bottom should be something like this:


    <?php endif; ?>

    If one of those is missing, well, it’s not going to work.

    Check out this page for more like this.

    Another reason your widgets would not work is if the javascript folder is in the wrong place. But, if you can drag and drop with no problem in the widget screen, that’s not the problem. If you can drag, but not drop? That’s the problem.

    If you still need help, you can mail me at:
    monkeypup AT gmail DOT com

    This is what I have in my sidebar to make the last five posts appear:

    <?php get_archives(‘postbypost’, 5, ‘html’, ”, ”, false) ?>

    P.S. I’m not using my most recent posts right now, so if anyone comes to my site expecting to see what this looks like you might be disappointed. Just thought I should let you know. But it does work.

    Thread Starter insaneelf

    (@insaneelf)

    Um, where exactly in the sidebar.php file do I add “<?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar() ) : ?>” and the other one?

    Edit: my post was not really necessary, was it?
    – deleted

    hey, InsaneElf – email me your sidebar.php file and I can make sure it works and all checks out. Since I don’t know what your sidebar.php file looks like after your changes, I can’t tell you where to add it.

    monkeypup at gmail dot com

    Thread Starter insaneelf

    (@insaneelf)

    Will do.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘HTML Code for “Latest Posts?”’ is closed to new replies.