Viewing 9 replies - 1 through 9 (of 9 total)
  • EDITED* Ouch, that chewed it up lmao.. Ok, now I just posted a link to the txt file, with the codes in it..

    This might help, it’s from the Papillon theme’s sidebar.php file..

    https://www.vindictivebastard.net/downloads/last-10-posts.txt

    This shows the last 10 posts, as far as I know.. you can always change it though.. I hope this helps.. =/

    spencerp

    Thread Starter bennett

    (@bennett)

    I don’t understand, what should I actually do with the code in that text file?

    I seem to remember the earlier version of the reply contained more information about what to actually do — it looks like when you edited it, the old information got deleted?

    I tried pasting that code into a file at:
    https://www.peacefire.org/test-last-10.php
    but that gave the error:
    “Fatal error: Call to undefined function: _e() in /var/www/html/test-last-10.php on line 2”

    Don’t double post ever!
    Just click “member” under your name and you’ll see all your old posts.

    Copy that code spencer gave you into your sidebar.php file. Change the number of posts from 10 to 3. You are done.

    Thread Starter bennett

    (@bennett)

    That’s what I was referring to in my last post, I tried pasting that code into:
    https://www.peacefire.org/test-last-10.php
    but it’s giving me:
    “Fatal error: Call to undefined function: _e() in /var/www/html/test-last-10.php on line 2”

    What am I doing wrong?

    I tried putting the file in the “/blog/” directory but that didn’t work either:
    https://www.peacefire.org/blog/test-last-10.php

    Thread Starter bennett

    (@bennett)

    I found the answer; the code at the link above:
    vindictivebastard.net/downloads/last-10-posts.txt
    is incomplete, you have to add:
    <?php require(“/var/www/html/blog/wp-blog-header.php”); ?>
    to the top of the file for it to work.

    ahh don’t think i hi-jack this thread i just re-direct from other post , well if i add those code in side bar present in https://www.vindictivebastard.net/downloads/last-10-posts.txt

    will it work for me ?

    or i have to make a php file as last-10-posts.php ?

    if so how to pul it in the side bar ?

    will it work for me ?

    Yes, it should work for you.

    or i have to make a php file as last-10-posts.php ?

    No, I think that guy above was doing something else with it..

    if so how to pul it in the side bar ?

    If you copy ALL the codes from that link of mine, and put it into the sidebar.php file.. it *should* work, just fine.. You might have to style it though, for your theme’s style.css. Shouldn’t be too hard man.. ??

    spencerp

    Now, I’d better get to bed, I’m starting to type like you now.. that’s a bad sign! =P

    thank you its working , lol so bad i am(typing ! i thing so) well i am not english guy .

    Nah man, I was just kidding around.. ?? =)

    spencerp

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘how to display last 3 blog posts on front page sidebar’ is closed to new replies.