Jump to content


Photo
- - - - -

Use WordPress templates

wordpress templates Page Setup

  • Please log in to reply
3 replies to this topic

#1 hermit

hermit

    Newbie

  • Members
  • Pip
  • 2 posts
  • Country: Country Flag

Posted 30 September 2013 - 08:18 AM

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!

 

 



#2 Danny

Danny

    Is Awesome!

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

Posted 30 September 2013 - 11:11 AM

Hi,

 

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



#3 hermit

hermit

    Newbie

  • Members
  • Pip
  • 2 posts
  • Country: Country Flag

Posted 30 September 2013 - 11:24 AM

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, 30 September 2013 - 11:25 AM.


#4 Danny

Danny

    Is Awesome!

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

Posted 30 September 2013 - 12:22 PM

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.







Also tagged with one or more of these keywords: wordpress templates, Page Setup