0

I Created a Page(from Pages -> Add New) Called "Blog" when click the "Blog" menu in header I want to display the posts from default post not Custom Post Type How to do this ?

2

What about setting a static page as a page for posts?

Settings -> Reading -> Front Page displays

One static page for front (for example Home) and another static page (Blog) for posts.

  • "Blog" is not my home page – Relax Mar 18 '15 at 16:46
  • I'm telling you to set "Blog" as page for posts and a different page for front. – Przemek Maczewski Mar 18 '15 at 21:12
0

The following code get you default posts. (make changes accordigly but make sure post_type = 'post')

  <?php $args = array(
        'posts_per_page'   => 5,
        'offset'           => 0,
        'category'         => '',
        'category_name'    => '',
        'orderby'          => 'post_date',
        'order'            => 'DESC',
        'include'          => '',
        'exclude'          => '',
        'meta_key'         => '',
        'meta_value'       => '',
        'post_type'        => 'post',
        'post_mime_type'   => '',
        'post_parent'      => '',
        'post_status'      => 'publish',
        'suppress_filters' => true 
    );
    $posts_array = get_posts( $args ); ?>

To get this on your Blog page, Save as your page.php as blog.php and use above code (as per theme structure) on the blog.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.