• 0
Sign in to follow this  
Followers 0

Create Custom Page Template for Child Theme


Question

Posted · Report post

Hi,

 

I created a custom post type for books. And I use the Advanced Custom Fields plugin (and its Flexible Content Field add-on) created many meta boxes for this custom type. How can I create page template to display all the meta boxes? 

 

I checked the single.php file in DMS, but there is nothing there. Can I just create a single-books.php in my child theme? What should I put in the this file? 

 

Thank you very much for the help.

 

Leopold

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

I would also be interested in this. Along with a way to page a video page etc that have post type settings

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Good question.  I think the answer is that you may need a pro developer to deal with custom post types. If it's not in the docs, we don't know the answers yet. I've no idea how to create the template for these custom post types.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

leopold"] @[member="bfrye26 , you can't use the inbuilt templates and any PHP template you create will not show up in the post/page dropdown. So...

 

  • You create your books.php file and place it in your child theme as per usual. Then you need to create a new page and template, lets call it Books and save it.
  • Create a new widget area in the WP admin and assign it whatever name (books).
  • Drag a text widget in (you need to enable php text, google it) and in there call your books.php with <?php get_template_part( 'books' );
  • In Visual editor add a Widgetizer and assign your widget you just created above.

 

Thats it...

 

As for what to put in your books.php then thats up to you and it will require php, html and css knowledge.

 

Good luck.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0