Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Creating custom post template (http://forum.bytesforall.com/showthread.php?t=758)

paulae Mar 14, 2009 11:37 AM

Creating custom post template
 
Flynn, you told me how to create a custom post and page template. I did make a custom PAGE template, and it worked fine. But it didn't work for the POST template. I did as you said, exactly, but the new template does not show up in the drop-down template box in the new/edit POST area. It does show up in the drop-down template box to the right of the PAGE editing area, but that isn't helpful when doing a POST.

I put this at the top of the new template:
Code:

<?php
/*
Template Name: My Garden Template
*/
?>

And I named it my-garden-template.php and uploaded it to the theme directory. I used the index.php as the base.

What am I doing wrong?

Flynn Mar 17, 2009 03:40 PM

AFAIK posts cannot have Page Templates, page templates are for "Page" pages only.

paulae Mar 17, 2009 04:15 PM

I found out how to do it.

I copied index.php and customized as needed, then at the top, I put:
Code:

<?php
/*
Template Name Posts: My Garden Template
*/
?>

The word "Posts" is required. I also installed the custom-post template plugin, which creates a drop-down menu of custom templates, below the post editing box. This all works really well.

And I named the file my-garden-template.php.

Flynn Mar 18, 2009 10:36 AM

Good to know. Thanks for posting your solution


All times are GMT -6. The time now is 05:51 AM.

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