[SOLVED] Is there a way to show latest posts on static homepage

by nik0 Banned
5 replies
  • WEB DESIGN
  • |
I want to use a static homepage but feature latest posts there as well.

Or diffently said, I want to use latest posts at my homepage and add static content to it as well.

One way or the other, is there an easy solution for that?

For category pages it's relatively simple using the category description field, but for the homepage it turns out to be quite a bit more difficult.
#homepage #latest #posts #show #static
  • Profile picture of the author PotPieGirl
    You could make that "static content" a post but make it sticky so it's always on the top on your home page... then let the rest of the posts fill in under it like normal....
    {{ DiscussionBoard.errors[8909025].message }}
    • Profile picture of the author nik0
      Banned
      Originally Posted by PotPieGirl View Post

      You could make that "static content" a post but make it sticky so it's always on the top on your home page... then let the rest of the posts fill in under it like normal....
      Normally that would/should work indeed, however I use an Amazon affiliate theme that shows the products in special product boxes, 3 rows wide, with a read more tag so that static post would also show in such small little box while I want it to show over the full with.

      I can get it working somehow but then I need to hard code it in the responsible page and that looks pretty odd.
      {{ DiscussionBoard.errors[8909130].message }}
  • Profile picture of the author RobinInTexas
    You could use a theme that provides that ability, or if your theme doesn't provide one, you could create a child theme with a custom home.php to do it. Static page/post plus "x" number of recent/sticky posts.
    Signature

    Robin



    ...Even if you're on the right track, you'll get run over if you just set there.
    {{ DiscussionBoard.errors[8909157].message }}
    • Profile picture of the author nik0
      Banned
      Originally Posted by RobinInTexas View Post

      You could use a theme that provides that ability, or if your theme doesn't provide one, you could create a child theme with a custom home.php to do it. Static page/post plus "x" number of recent/sticky posts.
      I tried it with mycustom-page.php and selected that for the static page instead of the default template, but somehow that doesn't work either (it works on category level but not on homepage level).

      I like the theme cause of the product boxes in the 3 column setups but when something needs to be changed it's a hell.
      {{ DiscussionBoard.errors[8909257].message }}
      • Profile picture of the author nik0
        Banned
        SOLVED:

        Instead of making it a static homepage I chose to show the latest posts and use the following code to show a static page as well:

        Code:
        <?php  = new WP_Query("page_id=979"); while(()) : ();?>
        <?php the_title(); ?>
        <?php the_content(); ?>
        <?php endwhile; ?>
        {{ DiscussionBoard.errors[8909442].message }}

Trending Topics