Jump to content
Sign in to follow this  
kneops

How to structure a custom template

Recommended Posts

kneops    4
kneops

I've read the docs about adding a custom template, like page.homepage.php but I still have no idea how to add content to that template. I've looked inside the folders of the pagelines directory to find a example of the structure used by PL for building a single post template or a category template. Where are they?

 

For the rest I asume that whatever I place underneath setup_pagelines_template(); will be the part between the head and footer?

 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

It is not possible to build a Post template or a Category template, as these pages are considered special by Wordpress. The custom page template is for creating a custom page template that can be used in PageLines > Drag and Drop, where you also have Template | Default, Template | 1, Template | 2,  Template | 3 etc...

 

To add content to your template such as sections etc... go to PageLines > Drag and Drop and select your custom template, which if created correctly, should now appear in the templates list.

 

Then you go to Wordpress > Pages, add/edit a page and then in the template drop down menu on the right hand side, select your template.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
kneops    4
kneops

So adding a custom template is nothing more than adding numerous extra templates to be able to construct using the drag and drop section?

I thought is was an option to build a template completely by hand if that was needed.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Why would you want to create a page template by hand ?

 

If however, you're referring to adding your own content then the best course of action would be to build your own sections.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
kneops    4
kneops

Until now I've been building my WP sites 'by hand', so perhaps I'm still too much used to that ;) I will read a bit more about sections and hooks.

Anyway, what I said, was that correct?: 'So adding a custom template is nothing more than adding numerous extra templates to be able to construct using the drag and drop section?'

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Yes, if you create a custom page template, it is basically another template which you can use in drag and drop.


Please search our forums, before posting!

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  

×