Archived

This topic is now archived and is closed to further replies.

  • 0

Cannot assign Custom Post Page Template under Pages

Question

Posted · Report post

Hi guys,

 

I'm working on a site a the moment for a client's furniture company. For one of the pages I required a custom post type to display and better organize the data. After generating the custom post type with various meta options etc..  (called portfolio-post-type.php) and including in the functions.php file I noticed that pagelines framework (V2.4) automatically generated the following for the post type:

 

1. Post root template (called Portfolio)

2. Post archive Template (Called Portfolio Archive)

 

My problem is though now I'm unable to assign these templates to the associated pages? If I go and view a page under page attributes > template dropdown  the automatically generated templates for the custom post type does not appear? How do I display the the post loop for a particular custom post loop category on a particular page?

 

without pagelines previously I'd make a custom page template and call <?php query_posts( 'post_type=Post_Name'); ?> before the loop, but how do you do this here with the automatically generated templates?

 

I looked around and there are a few questions on something along these lines but I havent found a clear answer on the forums yet..

 

Cheers

 

Steve

 

 

 

 

 

Share this post


Link to post
Share on other sites

4 answers to this question

Posted · Report post

Unfortunately, your custom post types will look like standard posts, the only way to customise there layout/style would be to either use hooks or create your custom section for your custom post type.

 

For more information on hooks, please visit our hook documentation - http://support.pagelines.me/docs/customization/hooks/

 

If you're not comfortable using custom code or creating your own unique section, then I recommend you contact one of our Pros, who will be happy to assist you.

 

http://www.pagelines.com/pros/

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Steve,

 

You do not use Pages for your Custom Post Types, you use the custom post types themselves.

 

For example, lets say I have just this moment created a custom post type called books, there will be a books menu item available, similar to Pages/Posts, this is where I can add new books. When I use this, the custom post type automatically, has the template assigned to it, similar to how posts have the Blog Post template automatically assigned to them.

 

http://screencast.com/t/ePjD1lQXf

 

Although you can create custom post types by adding the code manually to your functions.php file, I recommend one of the following plugins.

 

http://wordpress.org/extend/plugins/custom-post-type-ui/

http://wordpress.org/extend/plugins/simple-custom-types/

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Danny,

 

 

Yep I just realized that after posting thanks... Currently under my menu I have linked to a custom post category which contains one sample post. 

 

ie: http://localhost/JarrahCreations/products/bedroom-sets/

 

The page loads correctly but does not show the post? How do I show the post loop of the custom post type on this page, ie all bedroom sets and customize the post output?

 

Looking at those plugins now also. They seem to generate the custom post type easily but havent found any info yet on styling and page templates of the post type itself after generation..

 

Cheers

 

ST

Share this post


Link to post
Share on other sites

Posted · Report post

Ok cool, that's no worries, I can create my own section. At least now I know what I need to do. I was thinking I might have to do that but wasnt sure.

Share this post


Link to post
Share on other sites