Support » Themes and Templates » WordPress page is pulling post from main index page

  • Resolved josiahmann


    I have a custom theme set up at with a static page as my home page. I have other separate pages that are correctly pulling the page info from my WordPress editor, but the “products” page pulls the post data from the home page- so basically I have two pages pulling the same data. I assume it has something to do with my page.php file but I don’t know what I’m doing wrong. Any ideas?

Viewing 8 replies - 1 through 8 (of 8 total)
  • My first guess is that you set Page=Product as Static front page, is that right ?

    Also please consider putting body_class() into body tag.

    In header.php change this


    to this

    <body <?php body_class(); ?>>

    The static home page is set to “home”, not products.

    I will try your suggestion when I get a chance at lunch.

    Ok, I have changed the body to “<body <?php body_class(); ?>>”. Still no luck.

    So on your front home, view source and see this

    <body class="home page page-id-2 page-template-default">

    On your Page=Products, view source, and also see the same thing.

    <body class="home page page-id-2 page-template-default">

    Conclusion is that the page-id-2 is set as static front home.

    On a separate note, the validator says there are 2 closing tags not properly closed.

    Wow I didn’t know about that validation tool- is it kind of an industry standard tool?

    The homepage is set to home- which doesn’t have a name in my wp page. When i set it to products it loads properly. Then when I reset the front page to home, it temporarily works right before reverting…

    Have a read of Validating_a_Website.

    The homepage is set to home- which doesn’t have a name in my wp page.

    You should put in the page name for Page set to home, don’t leave it empty. Use a name that relates to your site for SEO purpose, and then put this in stylesheet.

    /* ----- hide title on home keeping SEO ----- */
    .home .entry-title {
    	position: absolute !important;
    	clip: rect(1px 1px 1px 1px); /* IE7 */
    	clip: rect(1px, 1px, 1px, 1px);
    /* ----- just some adjustments ----- */
    .entry-content {
    	margin-top: 43px;

    Ok, apparently it is working now, but I’m not really sure what fixed it… Thanks for the help.

    Paulwpxp thanks for the tip, thats a great idea.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress page is pulling post from main index page’ is closed to new replies.