• Hi to all.

    Does anybody knows how to create a welcome page (static)?

    [Top half of the webpage]
    I want to create a general welcome page (like a business profile + services) with some links in which to divert to other links example social media buttons to link to those sites?

    [Bottom half of the webpage]
    I want this part to show the summary/spinet of my latest blog posts

Viewing 3 replies - 1 through 3 (of 3 total)
  • Make a page template: Page Templates ? WordPress Codex

    Use a custom query in the page template below your static text. This will show the excerpts from the latest 2 posts from the category “mycategory”; change to the name of your category:

    <?php $my_query = new WP_Query('category_name=mycategory&showposts=2'); ?><?php while ($my_query->have_posts()) : $my_query->the_post(); ?><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a><?php the_excerpt();??><?php endwhile; ?>

    Set the page as a static page in Settings/Reading

    Thread Starter ryanweijian

    (@ryanweijian)

    thanks for the hyperlink, i’ll take a look and try to configure it.

    i’ve got another question in response to your reply.

    what if i want to allow excerpts of latest 5 posts from multiple categories instead of fixing it to just one?

    is there any way to go about this?

    You can use as many instances of that new_query above in a page by changing the category, but to make the code cleaner and do other things, you need to work more with query_posts: WordPress ? Support ? How do I show posts from multiple categories using WP_Query?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to create a page showing both static and lastest blog post’ is closed to new replies.