Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   [SOLVED] template pages - unexpected behavior (http://forum.bytesforall.com/showthread.php?t=17643)

mcphoto May 23, 2012 06:48 AM

[SOLVED] template pages - unexpected behavior
 
WP 3.3.2, ATA 3.7.7

Here's an odd problem I've encountered on two different sites in development;

http://chigallery.com/gallery/

Sites needed a front page a bit more complex than the rest of the site; so I used a template page...

Code:

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

The template (in this case "Home") shows up in the page editor, and works as expected.

However, when I set the site's front page to be the templated page... and set the "posts" page to be a news page or blog page (IE, posts are not on the front page)... BOTH pages use the template.

I've tried duplicating Index.php and giving it it's own template name (like "Blog.php") but the POSTS page still uses whatever template is assigned to the front page.

On the site above, you'll see both the home page and the "events" page are the same.

Any ideas?

juggledad May 23, 2012 07:58 AM

Make sure you don't have a caching plugin active during development

mcphoto May 23, 2012 08:06 AM

Nope, not a thing. Only a couple plugs running, I'll try shutting them down.

Edit: only contact form7 and special recent posts running so far - not the culprits.

Odd that this is on two different sites, on two different hosts.

juggledad May 23, 2012 08:13 AM

Oh, name the template something other than 'home'

mcphoto May 23, 2012 08:37 AM

Well I'll be dipped in... that did it.

Funny, "home" seems to me a non-technical sort of word; I guess WP or ATA uses that as a definition somewhere. Wordpress uses "front page" to describe it in the interface; though my page name and menu label for the front page is "home", my posts page doesn't use that.

Thanks for the idea!

juggledad May 23, 2012 08:46 AM

There is a flow chart in the Wordpress codex that shows how templates will be called, can't remember where, but I did remember about home.php :)
Glad it resolved this


All times are GMT -6. The time now is 03:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.