Jump to content

Archived

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

tforasiepi

New Section Not Reading LESS file

Recommended Posts

tforasiepi

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
Danny

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.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
tforasiepi

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
Danny

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 ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using the LESS/CSS Pagelines extension and tried to add the following code to make use of FontAwesome:
      a.c2a:before {
          content: "\f07a\00a0";
          font-family: "Font Awesome 5 Pro";
          Font-weight: 900;
          font-style: normal;
          font-weight: normal;
          text-decoration: inherit;
          padding-left: 4px;
      }
       
      The issue is that as soon as I have the CSS via the Custom Styling text box, Pagelines (or the extension) strips out the backslashes (\). As a result, I had to abandon the CSS/LESS extension and instead add all my CSS code to a separate .css file.
      Is there a fix or workaround for this?
      Thanks
      Michael
    • sakkthi subramaniyam
      By sakkthi subramaniyam
      Working on a very old site which has  pagelines framework theme. I need section plugin. so i can install postpins section. I have lost backup copy.
      Thank you.
    • chamois_blanc
      By chamois_blanc+
      I haven't seen any PL5 active development in months. Starting to look at alternatives like Elementor. It looks like PL5 development is dead. Am I wrong?
    • elementalkites
      By elementalkites+
      Good evening. I am attempting to use the Impulse section on a page I am working on (https://dev.elementalkites.com). The tool seems to have the ability to overlay a logo on top of the slider images but in my case it isn't working, even though I have added the logo file and given it a height to display at. I have attached a screenshot for reference. Any help would be appreciated.
       
       
    • jojoking
      By jojoking+
      I have to admit to being baffled.
      I'm trying to embed a video (from my WP media library) within a WP post using the videobox section shortcode.
      The shortcode section popup only allows two items to be configured - the section type, in this case videobox - and a unique id. There's no URL or other parameters such as autoplay or loop which are available within the Pagelines editor.
      Whatever I put in the unique ID makes no difference to what is shown which seems to be a default video with stars or white noise on a black background.
      I assume I need to define this ID somewhere else, or maybe WP has done it for me?
      HELP!
       
      PS This is the page source generated when a shortcode is added within the WP post editor
      <!-- VideoBox | Section --> <section id="videobox_1675853156" class="pl-sn pl-col-sm-12 pl-col-sm-offset-0 pl-sn-videobox" data-object="PL_VideoBox" data-clone="1675853156" data-level="0"><div class="pl-sn-wrap"><div class="pl-sn-pad fix" data-bind="pledit: true" > <div class="video-highlight"><h3 class="video-title" data-bind="pltext: vb_title"></h3></div> <div class="pl-video-box" data-bind="plcallback: { vb_autoplay: vb_autoplay(), vb_loop: vb_loop(), vb_controls: vb_controls(), vb_video: vb_video()}" data-callback="videobox"> <video id="280414138" autoplay loop > <source src="https://www.handinhandmanchester.org.uk/wp-content/plugins/pl-section-videobox/default.mp4?r=280414138" type="video/mp4" /> No browser html5 video. </video> <script> jQuery('#280414138')[0].load(); </script> </div> </div></div></section> </div>  
      If I add a videobox section using the Pagelines page editor the page source generated includes my video:
      <!-- VideoBox | Section --> <section id="videobox_udvu4uz" class="pl-sn pl-col-sm-12 pl-col-sm-offset-0 pl-sn-videobox" data-object="PL_VideoBox" data-clone="udvu4uz" data-level="0"><div class="pl-sn-wrap"><div class="pl-sn-pad fix" data-bind="pledit: true" > <div class="video-highlight"><h3 class="video-title" data-bind="pltext: vb_title"></h3></div> <div class="pl-video-box" data-bind="plcallback: { vb_autoplay: vb_autoplay(), vb_loop: vb_loop(), vb_controls: vb_controls(), vb_video: vb_video()}" data-callback="videobox"> <video id="429558737" autoplay loop > <source src="https://www.handinhandmanchester.org.uk/wp-content/uploads/2017/04/HIHWelcome.mp4?r=429558737" type="video/mp4" /> No browser html5 video. </video> <script> jQuery('#429558737')[0].load(); </script> </div> </div></div></section>  
×