Jump to content
Sign in to follow this  
zouleo

Move custom branding section from child theme to plugin

Recommended Posts

zouleo

The pagelines-customize plugin seems as a better choice than a child theme, since it can handle languages. Now I want to move my custom made branding section from the child theme to the plugin. Is that possible?

Share this post


Link to post
Share on other sites
Simon
Sections are scanned from these locations: Parent framework sections folder. Child theme sections folder. Pagelines-sections plugin sections folder. If you want to add the customize plugin as a location you will need to use a filter. Whats wrong with keeping them in the child theme or the pagelines-sections folder?

Share this post


Link to post
Share on other sites
zouleo
I'd prefer to have all my customizations on one place - that's all. And since I have to have the language in the customize plugin, then I'd prefer to have my other customizations there as well.

Share this post


Link to post
Share on other sites
catrina
I'm not sure what filter you'd need in this situation, but you'll need to insert it properly in the functions.php file in the PageLines Customize plugin folder.

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
zouleo
Today I have themes/pagelines-template-theme/sections/branding/section.php. Should I put the content of that file in plugins/pagelines-customize/functions.php? Please advice.

Share this post


Link to post
Share on other sites
Simon
@zouleo No leave it in the child theme. The base child theme will NEVER be updated.

Share this post


Link to post
Share on other sites
zouleo
Thank you. But can you please make it possible to have my languages in the child theme? I don't understand why I have to keep my customization in different places.

Share this post


Link to post
Share on other sites
Simon
open init.globals.php and replace the language varibale section with this: http://paste.pagelines.com/62t

Share this post


Link to post
Share on other sites
zouleo
Thank you! Is this a permanent modification (future versions)?

Share this post


Link to post
Share on other sites
Simon
did it work?

Share this post


Link to post
Share on other sites
zouleo
I havent tested it. I will try it when it is available in 2.2.2. I don't like editing files. All I want to do is to keep my customizations in one place so that I can update to the latest versions of your theme without problems.

Share this post


Link to post
Share on other sites
Rob
The whole concept of the child theme and the Pagelines Customization plugin was to ensure that changes made in customization are not overwritten. Unfortunately, too many folks don't read the documentation http://www.pagelines.com/wiki and add customizations in all the wrong places. Rest assured, we don't do anything that would endanger your customizations when added to the right places.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
zouleo
The documentation doesn't even mention that languages can only be used with the Customize plugin: http://www.pagelines.com/wiki/How_to_Use_the_PageLines_Customize_Plugin. It only mentions the differences between child theme and customize plugin. But since languages cannot be used in child theme I have to use both child theme and customize plugin... Is that the way it should be?

Share this post


Link to post
Share on other sites
Rob
Yes. And I apologize for the shortcomings of our docs in that area. I will alert our management about that. It's normal to use both the child theme and the customize plugin as they both function nicely together.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Simon
@zouleo The reason languages were not natively imported from the child theme folder is because its the child theme authors responsibility to translate his/her child theme and provide a pot file for the new theme and make the the child theme translatable. Child themes should have a separate localization 'slug' than the parent theme. This is why the customization plugin was born, so you can install whatever child themes you like, but your custom code stays in that plugin. The base theme is there a basic skeleton theme for developers to build on. Hope this helps. So just to re-iterate: Main i18n files are loaded from custom plugin if they exists, or main framework folder as a fallback. If you want to localize your childtheme you need to create your own pot files and use your own translation slug.

Share this post


Link to post
Share on other sites
zouleo
Ok. Thank you for your clarification. Makes sense! :) I'm only using the child theme to have my own branding section. But as I understand this section can not be moved into the customize plugin? Would it be better/possible to use the pageline sections plugin for this? I understand that you have reasons for all these different plugins. but for me it is kind of hard to understand how/when I should use them.

Share this post


Link to post
Share on other sites
Simon
Yes, look ^^ at post 2 I suggested the pagelines-sections plugin ;)

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  

×