Jump to content

Archived

This topic is now archived and is closed to further replies.

tom0360

Adding custom functions to DMS with no child theme

Recommended Posts

tom0360

I have read on a few different forums a couple of suggestions how to add my own custom functions to a pagelines site. As some of the posts were older I wanted to check if there was a right and wrong way and/or if anything has changed that I should be aware of before proceeding.

 

The site that I need to add a custom function to is running DMS and has no child theme set. From the forums it seems I have two options. Either create a custom plugin to add my functions to or download the custom functions plugin. Has there been any changes or any new methods to add some custom functions to a DMS theme and if not which of these is a better solution? 

 

These are the forums I am referring to:

http://forum.pagelines.com/topic/35763-functionsphp-for-pagelines-store-child-themes/?hl=custom+functions

 

http://forum.pagelines.com/topic/30072-where-can-i-safely-put-custom-functions/?hl=custom+functions

 

Thank you for your assistance.

 

 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

The best method is to use a child theme, as you can not add your functions to the DMS core functions.php file. As this will likely nuke your site and voids all support we can provide. The other option is to create your plugin, but I would suggest a child theme being the simplest of the two.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
tom0360

Hi Danny,

 

Thank you for you reply. What files are needed to create the child theme. In a normal wordpress I can do it simply with just a style.css file. I am thinking I will also need at least a functions.php to be able to add my custom functions. Will I need the setup.php, and style.less files?

I don't want to have to create the site, layout and sections so would just the style.css and functions.php work?

 

Have a great day.

Share this post


Link to post
Share on other sites
tom0360

Hi Danny,

 

I downloaded and installed the theme everything seems to be working. 
 

Thank you again for your support.

Share this post


Link to post
Share on other sites
Danny

No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×