Jump to content


Photo
- - - - -

Cannot assign Custom Post Page Template under Pages


Best Answer Danny , 31 March 2013 - 09:33 AM

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.pagel...mization/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/

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 steck1983

steck1983

    Member

  • Members
  • 27 posts
  • Framework Version:2.02
  • Country: Country Flag

Posted 31 March 2013 - 08:48 AM

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

 

 

 

 

 



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17015 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 31 March 2013 - 09:15 AM

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.

 

Please Login or Register to see this Hidden Content

 

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

 

Please Login or Register to see this Hidden Content

Please Login or Register to see this Hidden Content



#3 steck1983

steck1983

    Member

  • Members
  • 27 posts
  • Framework Version:2.02
  • Country: Country Flag

Posted 31 March 2013 - 09:29 AM

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:

Please Login or Register to see this Hidden Content

 

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



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17015 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 31 March 2013 - 09:33 AM   Best Answer

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 - 

Please Login or Register to see this Hidden Content

 

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.

 

Please Login or Register to see this Hidden Content



#5 steck1983

steck1983

    Member

  • Members
  • 27 posts
  • Framework Version:2.02
  • Country: Country Flag

Posted 31 March 2013 - 09:37 AM

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.