• Hi Everyone,

    I’ve just put up a new website, which had been previously running a full wordpress template. This time around, I’ve built a mostly static site that just has the occasional php call to wordpress for either plugins or posts. I am, however, having one issue:

    Anytime I view a blog post, it is using my /index.php file as its template (which is the front page of my site). Is there any way to specify a different file for use on all of those pages? I’ve searched the forum and read all about page heirarchies but haven’t found the answer, and I’ve tried everything I can think of to fix this, but no luck. Help!

    Thanks in advance,
    Luke

Viewing 15 replies - 1 through 15 (of 15 total)
  • Lukehill, if I understand you correctly, you may try and create a page template which you could use instead of the default for a page. Here is some info that may help: http://codex.wordpress.org/Pages#Page_Templates

    Anytime I view a blog post, it is using my /index.php file as its template (which is the front page of my site). Is there any way to specify a different file for use on all of those pages?

    http://codex.wordpress.org/Template_Hierarchy

    i.e.
    a single blog post would use single.php if exists;
    a front page would use front-page.php or home.php (depending on the detsils) if exists.

    Thread Starter lukehill

    (@lukehill)

    Thanks for the replies – I’ve looked at both of those pages previously, but what I’m experiencing doesn’t seem to be consistent with them (hence my confusion).

    I have a single.php file in both the root directory and the theme directory, but when I click on a post, it’s still reading from my index.php in the web root directory.

    Any other ideas?

    Thanks again…

    Can you switch to the default theme to see if you still have this behavior? This will help narrow it down.

    Thread Starter lukehill

    (@lukehill)

    Sure – thanks. I switched to the default theme and it does the exact same thing.

    Could you post a link to your site?

    Thread Starter lukehill

    (@lukehill)

    Woops – I should’ve done that already…

    The site is http://www.lukehill.com

    I’ve migrated it from a purely wordpress-based site into something almost entirely static, but I’m using wordpress for the gigpress plugin (both at the bottom right of the main page and on the ‘gigs’ page) and then for my ‘Latest News’ on the bottom left of the main page.

    If you click on the post featured under ‘latest news’ you’ll see the issue I’m having – it just displays my main page all over again.

    Thanks again for your help!
    Luke

    Hmmm…I noticed that if you click the author Link (Luke Hill) or the category (Music Videos) it does the same thing – shows the index page even though the url is correct. I actually had something like this happen recently but a plugin was the culprit. I would systematically disable plugins and/or change the permalinks to see if you still have this issue. Let us know if this helps.

    Thread Starter lukehill

    (@lukehill)

    Exactly – thanks for the guidance – I’ll work on that today and report back what I find out.

    Thread Starter lukehill

    (@lukehill)

    Okay – I’ve tried disabling all the various plugins, and even with every single one deactived, it’s still doing the exact same thing. Any other ideas?

    Not sure without looking at the code. Since you have some custom stuff going on, it might be hard to give advice further.

    Thread Starter lukehill

    (@lukehill)

    Dang. Okay, well, thanks for trying!

    No problem. Good luck.

    I am suddenly having this same problem. lukehill, did you ever resolve it?

    Thread Starter lukehill

    (@lukehill)

    No such luck.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Help bypassing index.php?’ is closed to new replies.