• Resolved hellodrifter

    (@hellodrifter)


    I have a CMS style theme that is entirely composed of static pages, except just now I am trying to wrap my head around creating a functional blog/posts loop template to make a dynamic blog “home” page.

    I have set my site to display a static front page, all pages are currently using a bare-bones index.php loop.

    I’ve attempted to make a basic blog template named “page-389.php”, only problem is that the template file will not output html. It looks like this.
    [Code moderated as per the Forum Rules. Please use the pastebin]

    It is outputting my posts correctly, but the html code in the template is not being output. I have tried placing it everywhere, inside and outside the loop. Nothing works. My header and footer templates output html, why won’t this blog template?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter hellodrifter

    (@hellodrifter)

    It’s just as well that an unhelpful moderator came around and deleted my code snippet without warning. Turns out that after I changed the template name from “page-389.php” to “home.php”, something I had already done a half dozen times before without results, it suddenly begins to output my html code properly. Thus, the snippet is irrelevant.

    As to why it did not output my html code the preceding half dozen times I changed the template file name to home.php is beyond me. I admit I am not particularly bright, and my conceptual understanding of wordpress is lacking at best, but this is not the first fix I’ve stumbled across that has appeared entirely random.

    Conclusion: I have no idea why my template was not working before, and I have no idea why it is working now. My best guess is that I had buggered up the template hierarchy.

    esmi

    (@esmi)

    Did you read https://www.ads-software.com/support/topic/welcome-to-the-themes-and-templates-forum or https://codex.www.ads-software.com/Forum_Welcome ? It clearly states that any code over 10 lines long will be removed, on sight, by forum moderators.

    Thread Starter hellodrifter

    (@hellodrifter)

    Nah, I can’t say I did. I understand that the forum has rules and I don’t have a problem abiding by them. My bad for posting over 10 lines of code.

    I must admit though, I found it delightfully ironic that my code was removed right around the time I discovered that the solution to my quandary had nothing to do with the code snippet in question. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘blog template will not output static html’ is closed to new replies.