Jump to content

Archived

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

balfred1345

Adding Sections in Child Theme Folder Doesn't Work

Recommended Posts

balfred1345    5
balfred1345

I attempted to modify the Masthead section by duplicating it to my Sections folder that I made in my Child - Skeleton theme. 

After making changes to the LESS in the Masthead folder in my  Child Theme / Sections folder, the changes were not seen upon save and refresh. 

 

Could this be due to the strange (to me) folder structure that I see in wp-content/themes/DMS? There are two dms folders and two Sections folders as automatically installed in wp-content/themes. See screenshot here: http://screencast.com/t/Q4s3ZW4g

Is this install how the folder structure should actually be?

 

If the above is indeed correct, can you please tell me how I can get my sections in my child theme to be "seen" and to take precedence over the DMS theme sections?

 

Thanks,

Bruce

 

 

Share this post


Link to post
Share on other sites
greenfly    230
greenfly

Hi @Blafred1345

 

Did you reload the sections afterwards? 

 

How have you set up the Child theme - could you provide a screenshot of the file structure. 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

I am unable to recreate your issue, here is what I did.

 

1. I uploaded Skeleton to my test site

2. Activated it as a the main theme.

3. Created a sections folder in the Skeleton directory.

4. Copied the masthead folder from the DMS sections folder and pasted into the sections folder in my Skeleton theme.

5. Went to the sections.php file for the Masthead sections in Skeleton >> Sections and replaced the following from Section: Masthead to Section: Danny Masthead

6. Saved those changes and then went to my website, clicked on Add to Page and Reload Sections button. When the site reloaded, my Danny Masthead section was visible.

 

https://cloudup.com/c_DcBxE_ppo


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
balfred1345    5
balfred1345

Danny

 

I was able to follow your methods above, with the same results as you. 

I think what happened originally was I had previously put the DMS Masthead section on my page. I then made a change to the Skeleton Masthead section in LESS, and expected the Skeleton Masthead LESS to over-ride the DMS Masthead section. Which it didn't.

What I believe you are saying is the correct way to do this is to first make the Skeleton section, then place that section (ie Danny Masthead) into the page, then make LESS changes in the Skeleton Masthead style.LESS. 

Did I understand you correctly?

 

Thanks,

Bruce

Share this post


Link to post
Share on other sites
James B    436
James B

Hi Bruce, that is the correct process. Once you have created your own child section within the child theme you can make any changes to the style by adding your code into the style.less within the child theme. This will be compiled with the main css and override the core code.


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

If you only want to make simple changes then you can add your custom CSS or LESS CSS to correct file in your child theme. For example.

 

If you only plan on using standard CSS, then you add all this into your child themes style.css file.

If you plan on using LESS CSS and standard CSS, then you add this to your style.less file. The style.less file supports both.

 

Also, if all you want to do is override some aspects of a sections CSS, then you don't really need to make a child section. You can just override the CSS and add it to either the Custom > CSS/LESS Editor in the DMS Toolbar or use the style.css/style.less file. The main purpose of being able to create a child of a section is so that you customize all aspects of it, such as adding your options etc...

 

If you want to simply override a specific element then you don't really need to do it, but you can if you like. To override the default CSS without the need to create a child theme, see our documentation here - http://docs.pagelines.com/customize/overriding-default-css

  • Like 2

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
balfred1345    5
balfred1345

Thanks for the help!

 

It sounds like since I'm only overriding CSS, that my best bet is not to bother with creating a duplicate section in my Child Theme, and instead just using my style.LESS to override.

 

I appreciate the clarifications.

 

-Bruce

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • flourishdesignstudio
      By flourishdesignstudio
      I am working on a multisite installation and had some questions regarding the themeing options. All the sites will have the same structure but each individual site would need a different h1 font and link color. I had originally thought that I would program/edit the parent theme to have a certain set of templates, font sizes, etc. and then that would feed to all the individual sites where I could activate the child theme and use the child theme to define the individual sites' specific link color, heading fonts, etc. So, what I was shooting for was:
      Parent theme = shared by all sites
      Child theme = specific to the minor customizations on a per site basis.
      Is this possible? Am I misunderstanding how these would actually deploy to the different sites?
    • oseehys
      By oseehys+
      Hello There,
      So i want to use platform 5 and DMS sections on a single page, i am using a child theme with pinspro as my main theme and i activated platform 5, the only problem am having so far is the fixed option, my navbars are not aligning to their default size, and it will be great if platform 5 header and footer section will function, has anyone used this option, how can i make the best use of platform 5 and DMS on a site
      Cheers
    • jagipson
      By jagipson+
      Should be a simple answer but not sure why its not doing this.  I have a child theme installed on pagelines 5 that has a hook so it will write over the theme css. Strange is that when I am on the frontend the code works but in the dashboard your theme takes over my code and its no where to be found. See examples attachments
      @Andrew @Danny


    • TallTree
      By TallTree+
      Hi,
      I am trying to remove the sidebar areas from my child theme (pagelines.com) from the post pages on a site:
      https://staging4.talltreemusicfestival.com/2017/grand-analog/
      The content is all the way to the left and very small, and the two sidebar areas are taking up a lot of space.
      What I'm after is content to the left, taking up most of the space, and then a small sidebar width on the right for widgets.
      I've tried selecting 'read width content' and 'full width content' in the edit screen for the WP content section, but it doesn't change.  If I try to move the sidebars (1 or 2) to the left, it doesn't change.
      If I select the pagelines framework theme (not child), the two sidebars go away when not selecting them in the edit screen..
      Can someone please tell me what I'm doing wrong?
      Thanks in advance.
      -Matt
       
    • dbrowne02
      By dbrowne02+
      Hi, I noticed that framework and pagelines.com child theme has a number of errors when run through themecheck. The others, like material and bootstrap, don't have any errors when run through theme check. Is there a way to get it so that there are no errors on the child theme?

×