• Resolved trulyandy

    (@trulyandy)


    I am using WP2.7 as a CMS and the majority of the site I am building consists of static pages.

    In the Reading Settings I have selected Front Page displays A static page

    The Front Page displays a page I created (Home)
    The Posts page displays a page I created (Blog)

    The Blog page pulls and displays the posts correctly (woo-hoo!), however, it is not pulling the correct php or styles, and therefore my 2 navigation systems are not showing the correct info.

    I am 100% sure that the Template the Blog page uses is coded correctly (it works for all the other static pages I created).

    I honestly cannot tell where the Blog page is getting the info from that it is using to display the page.

    The Blog page is definitely set to the correct template, and the template is definitely coded correctly, but when the page renders, it seems to be ignoring all of this.

    When I look at the source code of the Blog page, instead of showing the correct markup, it is displaying some much older markup.

    I have no idea where it is pulling this markup from.

    Hope the description of my problem makes sense.

    I believe I have exhausted all available resources (IE searched the forums) and spent plenty of time on my end making sure all the obvious things are correct.

    I guess my main question is: Where else can I look to find where the Posts page is grabbing this incorrect/old code from.

    Thanks!!

Viewing 9 replies - 1 through 9 (of 9 total)
  • stvwlf

    (@stvwlf)

    The blog page generally uses index.php in the theme folder as its template. All your other pages probably use page.php

    Thread Starter trulyandy

    (@trulyandy)

    Thank you for your response stvwlf. I looked into the index.php code and here is somewhat of an update:

    • In the Reading settings, I have the Posts page display set to a static page I created called Blog
    • In the Pages menu settings I edit the static page I created called Blog to use a template I created called Blog Template

    The Blog Page should now be built using the information it grabs from the template I assigned to it (Blog Template), and not index.php, or page.php, or anything else besides the template I assigned to it, correct?

    Am I missing something here? completely off base?

    Additionally, I also have edited index.php, pasting the blog_template.php code and saving it.

    Yet the Posts page (Blog) still is applying old, incorrect styles.

    Any other ideas?

    thanks!

    Thread Starter trulyandy

    (@trulyandy)

    not sure if this will cause the thread to be blown up, teased, or otherwise negatively viewed, but looking for any fresh ideas???

    stvwlf

    (@stvwlf)

    Did you add the necessary comments to the top of your custom page template file?

    <?php
    /*
    Template Name: Whatever
    */
    ?>

    Thread Starter trulyandy

    (@trulyandy)

    Yes….I had the template name commented in there.

    Thanks again, stvwlf, for heading back to this thread. I can’t believe how active this board is!

    I finally figured it out.

    For some reason, the Blog Page was using the home.php template, which was the only template in the whole system that was using old php and styles.

    I am not sure why this was happening, as I specified in the Pages section for the Blog page to use the blog_template.php template, and had the blog_template correct.

    Any ideas???

    Anyways, solved. Not sure why it functions like that, but I did figure out which template the page was drawing php and html from.

    stvwlf

    (@stvwlf)

    Hi

    If you don’t already have it set up that way, it is very handing while debugging to have HTML comments near the top and bottom of each php template file. Then you know at a glance which file is being used.

    —- call to header code —-
    <!– index.php –>

    — template code here —

    <!– end index.php –>

    —- call to sidebar code —-
    —- call to footer code —-

    I had this same problem. My solution was to change home.php to home_template.php.

    lesfreeman’s fix worked for me temporarily but then my page started using the index.php template.

    Anyone have a better fix?

    I have used lesfreeman’s fix on two different sites now, works like a charm. I had noticed this behaviour by accident, and it seems he found the exact same fix for it. ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Blog Posts Page a Static Page – not pulling correct php/css info’ is closed to new replies.