• 0

New Section Not Reading LESS file


Question

Posted · Report post

Hi,  

 

I want to use the NavBar section, but need to modify its functionality and style.  I followed the developer documents on creating a new section.  The section seems to be working sans the .LESS styling.  Is there a more detailed tutorial or is there some code that needs to be added somewhere to tell the new section what .LESS file to use?

 

Here is my structure:

   lccs/wp-content/themes/dms_child_lccs/sections/navbar_bluelogic

 

In the Section.php file I changed it to:

/*
Section: navbar_bluelogic
Author: PageLines
Description: A responsive navigation bar for your website.
Class Name: navbar_bluelogic
Workswith: header
Loading: active
Filter: nav, dual-width
*/

 

I also changed the class .navbar in the .LESS file (in the navbar_bluelogic section folder) to .navbar_bluelogic.  But I have not found the secret handshake... Can someone help?

 

Thanks!

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

Hi,

 

You have likely not changed the class name on the following code in the sections.php file.

 

/**
 * Main section class
 *
 * @package PageLines DMS
 * @author PageLines
 */
class PLNavBar extends PageLinesSection {
 
Also, if you have changed the .navbar class to something else, then you're going to need to replace every single instance of .navbar throughout the section.php file to. Otherwise, your LESS/CSS will not work as the class name isn't associated to any HTML.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi,

Thanks for your help with this.  I have changed the name of the Main Section Class to BLNavBar and also made the revision in the Header Class Name to BLNavBar.  I can add the new section to my page and change the menu it uses, so it seems to be working.  But it does not pick up the LESS file, so there is no styling applied to the new navigation bar. I have not changed the .navbar class... should I do this?  If not, are there any other steps I can take to get the section to respond to the LESS file?

 

Thanks again.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I am not sure what you mean it doesn't pick up the less file, are you saying the section has no styling whatsoever or it is not picking up the custom CSS/LESS you have added ?

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