• 0

Use WordPress templates


Question

Posted · Report post

Hello,

 

I need to load a WordPress template (so not a PageLines template), because I need to load different scripts and markup on one page. How do I do this? The WordPress template meta box is gone and replaced by a DMS Page Setup box on Page Edit pages.

 

Or can I overwrite the code of a PageLines template? Like if the PageLines template is called 'Game', I can override that by creating a file called pl-template-game.php? If I could just copy the contents of header.php and footer.php in there, add some scripts and add my own markup (for a JavaScript game) I'd be happy. This is very easy to do with normal WordPress. 

 

I do hope that there's a solution because it'll be a real bummer if DMS can't do this. Thanks for replying!

 

 

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

Hi,

 

I apologise, but I don't know what you're trying to do, can you explain in greater detail please.

Share this post


Link to post
Share on other sites
  • 0

Posted (edited) · Report post

Hi Danny

 

I'm trying to load a JavaScript game on a page in a DMS website. To do that I need to load extra JavaScript files on that page and use custom markup. The easiest way to do that is to create a WordPress Template file and assign that to that page. This works for most any theme/framework, also worked in PageLines Platform 1.x. I can't load a WordPress template when DMS is running, because the option to load one is gone and replaced by PageLines templates.

 

This is how I would do it on any other theme:

 

I create template-game.php and add that to the theme.

I add this to the header:

 

/*
Template Name: Game
*/
 
Now it is a WordPress template. I can copy the contents of header.php and footer.php into that file and add my own scripts and markup for this specific template.
 
 
 
My other question is, if DMS breaks the default WordPress Template functionality, what is done to repair the loss of functionality? Can we create custom code templates for PageLines Templates?
For example, if the PageLines template is called 'Game', can I override the template creating a file called pl-template-game.php or whatever it needs to be called? 
 
If this is not possible, are there special hooks for PageLines Templates? Like, 'game_pagelines_head', 'game_pagelines_content' ? That would be an acceptable solution, although it's more work than the default WordPress Template system.
 
Thanks!
Edited by hermit

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

You can't create templates like that and couldn't that in PageLines Framework either. This is because of the way DMS has been designed, if you were to use normal custom templates, then you wouldn't be able to use DMS functionality.

 

Without seeing the code you're going to be using, its difficult to say how to best implement it. However, what I would suggest is for you to probably create your own section, but if you can provide the code you're going to be using, there may be alternative solution.

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