• Resolved Richard

    (@richrossi)


    I have looked all over this site for an answer I can use. That being said there seems to be a lot of solutions, but I am such a novice at this that most of it goes over my head……

    I want to add recent posts to my static home page. under the section that says “Upcoming Events”

    Someone on one of the forums suggested using the following code information.:
    “The easiest way to do this is adding to your static page a get_posts call.
    Here’s one example of a minimal Loop of that kind :

    <?php
     global $post;
     $myposts = get_posts('numberposts=5&category=1');
     foreach($myposts as $post) :
     ?>
     <?php the_title(); ?>
     <?php the_content(); ?>
     <?php endforeach; ?>"


    [Please use the code buttons when posting code here]

    The problem is I dont know where to put this code to show up on my page where I want it.

    Can anyone shed some light on this for me?

    Thank you.

    Richard

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adding posts to a static page’ is closed to new replies.