Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Default Template for All Pages (http://forum.bytesforall.com/showthread.php?t=16910)

rickheck Mar 3, 2012 09:55 AM

Default Template for All Pages
 
I know that you can create a template, and select it as you are creating/editing posts. The template replaces the use of the index.php, so is not affected by a theme update, right?

But what about a custom template that is automatically enabled for all posts without having to select it each time? And the custom template should 'survive' a theme update.

I know that I can modify the index.php, but that mod will be overwritten on the next theme update.

The intent is to have a banner ad (or any custom PHP function) above the center column, but not above each post (so kicker's can't be used).

A useful mod to the theme is a short piece of code that would look for a specific include file, and include it if found. That code would be in the "before the loop" area like what used to be available before WP didn't allow PHP code to be added. The advantage would be that the custom PHP function file would survive a theme update.

So first option is how to specify a default template without modifying the index.php. And the second is a request for a PHP include_once above the loop that would insert a custom PHP file (if it was found).

...Rick...

juggledad Mar 4, 2012 05:10 AM

index.php IS the default template for all pages


All times are GMT -6. The time now is 12:27 AM.

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