Jump to content


Photo
- - - - -

Tutorial: Building a Pagelines Child Theme from Scratch

pagelines child theme howto tutorial actions hooks LESS

  • Please log in to reply
3 replies to this topic

#1 Olly

Olly

    Advanced Member

  • Members

  • 66 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 01 June 2013 - 12:06 PM

[Note - I previously started this conversation in a separate thread but I want to open it up for more discussion so am reposting here.]

 

I am new to Pagelines and am trying to understand how build a child theme from scratch. I have some basic HTML/CSS knowldege but I am currently a beginner when it comes to PHP & Javascript. I have built some Wordpress sites before but have only ever made basic CSS modifications to an existing theme. I have never built a theme or child theme before.

 

I want to learn how to create/customise a child theme in Pagelines but I have no idea where to start, and can't find any documentation to help me.

 

I just watched the PDET Video tutorials. They were a little out of date but still very helpful in understanding how to create Pagelines Sections, even for a beginner coder like me. The problem is there are no more video tutorials! Sections were covered, but where are the rest of the promised videos on Themes and Plugins? We need a series of tutorials (maybe as videos) taking us though the steps of building a Pagelines child theme from scratch (or from the base child theme), similar to the sections video tutorials. I have looked at the Theming page but it does make a lot of assumptions about our knowledge. I currently don't really understand how all the different components fit together in creating a child theme.

 

Here are my questions:

  1. To build a child theme for Pagelines, do we need to know Wordpress theming already? If yes, are there any good tutorials out there to take us through the process?
  2. How do all the components of a child theme fit together? How do hooks and actions fit into the design?
  3. Do we need to learn LESS before we begin? Any good resources for this?
  4. Is there an example theme that uses bootstrap available? I want to understand how to use the grid.
  5. Is it easy to take an existing Wordpress theme and convert it into a Pagelines child theme? How do I do this? Would I even want to, or is it too long-winded?
  6. What are the best tools to use? How do you see what you are doing (CSS changes etc.)?
  7. Are their any video tutorials explaining how to create child themes for Pagelines? 

I like Pagelines in principle, but these days very few of us would build a WP theme from scratch for a new website - we'd simply take an existing theme and customise it. Pagelines does not appear to have much choice in this regard, since there are currently very paid few child themes available. 

 

Thanks in advance.



#2 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 01 June 2013 - 01:10 PM

This may help. FWIW, I NEVER take an existing theme and customize it, I always start from scratch. IMO that's the only way to go if you want full control, but you do have to know how to write code.

 

I have a lot of tutorials up here:

 

Please Login or Register to see this Hidden Content

 

This last project I just finished, from scratch:

Please Login or Register to see this Hidden Content


  • boxready likes this

#3 Olly

Olly

    Advanced Member

  • Members

  • 66 posts
  • Framework Version:DMS
  • Country: Country Flag

Posted 02 June 2013 - 06:05 AM

Thanks Nick. I had already read your tutorials. Being a relative beginner, I must confess that some of them went straight over my head.

 

I guess what I am looking for is a video tutorial that shows step-by-step how to start from a base child theme, and then how to customize it to create a theme that no longer resembles the Pagelines default theme.

 

I just need a better understanding of what the steps are when developing with Pagelines.


  • geoff likes this

#4 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 02 June 2013 - 01:10 PM

I guess what I am looking for is a video tutorial that shows step-by-step how to start from a base child theme, and then how to customize it to create a theme that no longer resembles the Pagelines default theme.

 

 

Really that's subjective. At what point does a site no longer look like child themes? It all comes down to the design itself.

 

There are a lot of different roads you can take when you go to build a child theme. It's a lot like being an engineer  and having to draw the blueprints out yourself before starting. Because there aren't really any boundaries, it makes the options endless, and the side effect of that is not having any "contraints" to fit in. It also means we have to form what the site looks like on paper or in our minds before starting on it. In other words, for folks like yourself, it's hard to grasp what area to start in. I'll try to explain.

 

 

First, what is a child theme? In PageLines, it's a style.css, a functions.php, the setup.php, and style.less. Child themes can have sections of their own within /sections. Child themes can control what the framework outputs as far as CSS goes, so some child themes have a /less directory. You copy whatever files you want from pagelines/less into your child themes /less directory and it will compile your first, skipping the parent. With this being known, now we begin to think on what approach you want to take to build a theme.

 

Quick Customize

This method, basically deals with customizing the existing sections that pagelines offers, and packaging them up in a child theme. So, in your child theme, you could have a custom boxes, or features design. Since all we did was ust fool with some settings and change some colors, there's no need to package these up with the theme. All your theme becomes is style.css, style.less, functions.php, and setup.php

 

Partial Custom

This method, is a lot like Quick Customize. But say you wanted the boxes section to have an extra link at the bottom or something, basically something the section doesn't do by default. You'd at that point, copy the section into your child themes /sections folder, and hack away from there. The shit wont be overwritten with updates because its in your child theme.

 

Full Custom 

This method you're basically controlling the framework. With this level, you're producing custom sections that aren't in the framework, and we're telling the framework exactly what we want it to compile. For example, maybe my project doesn't need poppovers or modals, so I'll copy modals.less from pagelines/less and paste it into my child theme. THen, I remove all the code from that leaving it empty. Now, PageLines will compile mine, and not theirs. And since its empty, it just got a little bit faster not having to compile and load it all. This is my personal favorite method. Some recent projects I worked in, I completely gutted the frameworks core styles and sections and loaded my own, custom, to what the design spec called for.

 

So really, you can do a little, or you can do a lot. It entirely depends on the scope of the project you're working on, and the skillset that you currently have. Hope this helps.


  • james_whitby likes this





Also tagged with one or more of these keywords: pagelines, child, theme, howto, tutorial, actions, hooks, LESS