Jump to content
Sign in to follow this  
erik@grancanaria360.com

Adding another template-x.php page to PlatformPro

Recommended Posts

erik@grancanaria360.com

Hi. I would like to add a new template page (template-x.php) to the PlatformPro theme so it will show in the Template Setup section and in the template area drop down menu together with the already existent templates. Any tips? Thanks in advance for the help. Best, Erik.

Share this post


Link to post
Share on other sites
catrina
There are instructions on how to create child sections and templates here: http://www.pagelines.com/docs/custom-sections

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
erik@grancanaria360.com
Thanks, will have a look!!

Share this post


Link to post
Share on other sites
erik@grancanaria360.com
Hi again. I am having some trouble, probably due to my lack of coding skills. I have added a "page.category.php" file to Platform Pro. Now I am attempting to add the necessary code in the "functions.php" files in base, but when I do my site goes south.. I am probably adding the code in the wrong place, I dunno.. Any help would be appreciated. Thanks again.

Share this post


Link to post
Share on other sites
erik@grancanaria360.com
Catrina, if you mean if the child theme is activated, yes, I activated ti when I installed both the PlatformPro and the Base. Never activated PlatformPro, but Child from the themes activation panel in WP.

Share this post


Link to post
Share on other sites
erik@grancanaria360.com
Hi, I am using the ???pagelines_add_page(???[page-id]???, ???[Page Name]???);??™ provided in the docs. The template page it makes reference to is: "page.template.php" and is located in the "PlatformPro" folder together with the rest of the templates. I am assuming the "page-id" is the name of the php file? I am a little lost. Also, in which point of the functions.php file should the code be inserted? Thanks again.

Share this post


Link to post
Share on other sites
catrina
When you're in the functions.php file, you need to place your code below this code: [code]// ADDING NEW TEMPLATES --------// // Want another page template for drag and drop? Easy :) // 1. Add File called page.[page-id].php to Base // 2. Add /* Template Name: Your Page Name */ and Call to 'setup_pagelines_template();' to that file (see page.base.php) // 3. Add 'pagelines_add_page('[page-id]', '[Page Name]');' to this functions.php file // Add Base Page if ( function_exists( 'pagelines_add_page' ) ) pagelines_add_page('base', 'Custom Page');[/code]

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
erik@grancanaria360.com
Catrina, thanks. That is what I have been doing but my website completey disappears in doing so.. Please see below the code: // ADDING NEW TEMPLATES --------// // Want another page template for drag and drop? Easy :) // 1. Add File called page.[page-id].php to Base // 2. Add /* Template Name: Your Page Name */ and Call to 'setup_pagelines_template();' to that file (see page.base.php) // 3. Add 'pagelines_add_page('[page-id]', '[Page Name]');' to this functions.php file // Add Base Page if ( function_exists( 'pagelines_add_page' ) ) pagelines_add_page('base', 'Custom Page'); ???pagelines_add_page(???[Category page]???, ???[page.category.php]???);??™ I am surely doing something wrong, but... Thanks.

Share this post


Link to post
Share on other sites
catrina
[code]???pagelines_add_page(???[Category page]???, ???[page.category.php]???);??™[/code] ^ This doesn't require the brackets (The instructions just include them).

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
erik@grancanaria360.com
My site still disappears when I insert the code...!! Code as it is now: [code]// ADDING NEW TEMPLATES --------// // Want another page template for drag and drop? Easy :) // 1. Add File called page.[page-id].php to Base // 2. Add /* Template Name: Your Page Name */ and Call to 'setup_pagelines_template();' to that file (see page.base.php) // 3. Add 'pagelines_add_page('[page-id]', '[Page Name]');' to this functions.php file // Add Base Page if ( function_exists( 'pagelines_add_page' ) ) pagelines_add_page('base', 'Custom Page'); ???pagelines_add_page(???[Category page]???, ???[page.category.php]???);??™[/code]

Share this post


Link to post
Share on other sites
erik@grancanaria360.com
sorry, without the brackets, as instructed.. [code]// ADDING NEW TEMPLATES --------// // Want another page template for drag and drop? Easy :) // 1. Add File called page.[page-id].php to Base // 2. Add /* Template Name: Your Page Name */ and Call to 'setup_pagelines_template();' to that file (see page.base.php) // 3. Add 'pagelines_add_page('[page-id]', '[Page Name]');' to this functions.php file // Add Base Page if ( function_exists( 'pagelines_add_page' ) ) pagelines_add_page('base', 'Custom Page'); ???pagelines_add_page???[Category page]???, ???[page.category.php]???;??™[/code]

Share this post


Link to post
Share on other sites
catrina
I think this is the code that's needed: [code]???pagelines_add_page(???Category???, ???page.category.php???);??™[/code]

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
erik@grancanaria360.com
Hi again Catrina and thanks so much for your help, but this is still not working. I pasted the code above and still my website disappears when I do so... Code: [code]// ADDING NEW TEMPLATES --------// // Want another page template for drag and drop? Easy :) // 1. Add File called page.[page-id].php to Base // 2. Add /* Template Name: Your Page Name */ and Call to 'setup_pagelines_template();' to that file (see page.base.php) // 3. Add 'pagelines_add_page('[page-id]', '[Page Name]');' to this functions.php file // Add Base Page if ( function_exists( 'pagelines_add_page' ) ) pagelines_add_page('base', 'Custom Page'); ???pagelines_add_page(???Category???, ???page.category.php???);??™ [/code]

Share this post


Link to post
Share on other sites
kastelic
Your have a file named "page.category.php" but it actually needs to be called "template.category.php". The entirety of that file should look like this. making sure you have an opening php tag at the beginning: [code]

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  

×