template_redirect() doesn’t seem to be working

Question

kind of a rookie question but here goes:

I’m working on a WordPress theme from scratch on my local machine, and I’m setting up a static page for the Blog. I have my archive.php file for all the posts and then a single.php for individual posts. However, when I put these files in my root folder (themes -> theme name), along with index.php, the file always seems to default to index.php. In addition to that, I was trying to use page.php as a default to any page styling, but that also seems to be defaulting to page.php. Here’s some information about what I’ve done.

  • I’ve built the functions.php from scratch, maybe there’s something I’m missing from this.
  • I have a second folder with templates. I didn’t realize page.php was causing an issue because I had a special template for every page.
  • My home page is being set to a static page but I have the option to actually choose the template. I don’t have that option on the blog page (/blog)
  • I’m wondering if there’s something I’m missing that’s in all professional themes for that functionality or I have some kind of plug-in that can be messing with it (the only plug-in I have on the site is Meta Slider.

I know this question is kind of open-ended, but I figured I’d give it a shot to see if anyone has had a similar problem. Any help is appreciated.

0
, eranostal 6 years 2017-01-11T19:40:40-05:00 0 Answers 78 views 0

Leave an answer

Browse
Browse