Help with some wordpress coding?

Discussion in 'PHP' started by micahman80, Jan 5, 2010.

  1. #1
    I'm hoping this is the right category to post this in...I would imagine that it's all you PHP experts that would be able to help!

    What I'm trying to accomplish is in a Wordpress website. What I need is to be able to have a PAGE where I do some text like an "about page"...then, underneath of that, I want to have all of my posts start and maybe have like the 5 latest posts.

    Does anyone know some sort of code that I could do or even a plugin I could use to make this happen? It sounds easy in theory, like it should just be one line of command...but I don't have a clue!

    Thanks!
     
    micahman80, Jan 5, 2010 IP
  2. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
  3. micahman80

    micahman80 Guest

    Messages:
    129
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks! Would you be willing to help me implement this? I looked at the stuff and it looks like I have to edit my template, which I have no idea how to do and have never done before.

    I attached the template that I am working with...

    Thanks!
     

    Attached Files:

    micahman80, Jan 6, 2010 IP
  4. chouxpastry2002

    chouxpastry2002 Well-Known Member

    Messages:
    365
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #4
    hello are you done with the issue. If not do not hesitate to contact us for the work.
     
    chouxpastry2002, Jan 7, 2010 IP
  5. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #5
    use this code. It gets 5 latest posts.

    Place it whereever you want.
     
    olddocks, Jan 7, 2010 IP
  6. micahman80

    micahman80 Guest

    Messages:
    129
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks olddocks. That didn't work though. I pasted it in the HTML of my "about" page, and now my page displays this:

    ‘,’

    ‘); ?>

    Any ideas?
     
    micahman80, Jan 7, 2010 IP
  7. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #7
    You should paste that code in template, not in post body.
     
    AsHinE, Jan 7, 2010 IP
  8. micahman80

    micahman80 Guest

    Messages:
    129
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Okay, so I only want it on the front page...so, wouldn't I put it in the "Main Page Template"? I tried that, and nothing shows up. I put it above the footer and above a line of code that says "end content".
     
    micahman80, Jan 7, 2010 IP
  9. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #9
    just put it in a
    if(is_home()) {
    // code here
    }
     
    JAY6390, Jan 7, 2010 IP
  10. micahman80

    micahman80 Guest

    Messages:
    129
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    still nothing :(
     
    micahman80, Jan 7, 2010 IP
  11. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #11
    You have open /wp-content/themes/<yourtheme>/header.php (or wherever you need output, be it footer, header etc)

    and then place the code.
     
    olddocks, Jan 7, 2010 IP