1
votes

Wordpress - separate blog page not showing the posts and showing the homepage of the custom theme... (not redirecting to home page just showing in place of blog page with the link http://www.example.com/blog on the addressbar of the browser)

As I have already adjust the setting on wp-admin following as SETTING>Reading> A static page Front page to Home (homepage of the theme) and posts to blog (separate blog page of the theme)

And Blog page consist the following code

<?php
/*
Template Name: Blog
*/

get_header();

if ( have_posts() ) :
  // Start the Loop.
  while ( have_posts() ) : the_post();
    get_template_part( 'content', get_post_format() );
  endwhile;
  // Previous/next post navigation.
  next_previous_paging_nav();
else :
  // If no content, include the "No posts found" template.
  get_template_part( 'content', 'none' );
endif;

get_footer(); ?>

And the Home page of the theme is almost static page.

1
I'm not sure what theme you are using but have you selected the blog template inside your blog page?Robert Lee
Yes! I have also selected the blog template for blog page on the wp-admin Pages>Blog>Page Attribute>Template>Blogma rafa
I am using custom themema rafa
Any assistance for my problem will highly appreciate.ma rafa
are you getting a no posts found or are you getting something completely different on the page?Robert Lee

1 Answers

0
votes

Make sure your static home page template is not in a file called index.php or home.php. If WordPress detects any one of those files it will automatically assume it is the template for your posts. Therefore create a front-page.php or similar for your static home page and index.php or home.php for your posts page.