• Hello,

    I created a custom theme, I have created the pages home and blog from wp-admin. Front page is front-page.php, posts page is page-blog.php. The settings are correct on wp-admin. I also created single-post.php, and single.php. However when I go to the permalink /blog/1412, or /1241, it does not utilize single.php, or single-post.php. None of the detecting functions in template-loader.php are picking up anything. Note, there is no index.php. The file page.php is correct for other pages I have created. Blog, and individual blog posts are not going to the pages I want them to.

    front page works with the function is_front_page() in template-loader.php
    pages such as about/page-image-alignment work with is_page() in template-loader.php

    What should I do?

Viewing 1 replies (of 1 total)
  • Moderator Marius L. J.

    (@clorith)

    Hi,

    Firstly, you -really- need an index.php file, this is one of two required files for any theme (the other file being style.css).

    Now a problem with your current permalink slug that you are showing here is that is’ all numbers, it’ll then look for a post with the ID of 1412, if none are found it will try to display 404.php, when 404.php isn’t found it will fall back to index.php, since neither 404.php nor index.php are present WordPress will fail to load anything.

Viewing 1 replies (of 1 total)
  • The topic ‘Template-loader issues’ is closed to new replies.