Jump to content

Archived

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

hrachovec

Need to replace navigation with custom code

Recommended Posts

hrachovec

Hello:

 

I've been having problems the existing navigation on a small mobile screen: the popout menu has a very glitchy animation and it's almost unusable. It's an issue I raised today and apparently it's a bug that's being worked on.

 

My site is here: http://brightldn.com/new/

 

In the meantime, I've had to look at how Bootstrap does a similar menu and then recreate the menu layout and style I'm aiming for. I've got it working and that test page is here:

 

http://brightldn.com/new/navtest/

 

That test page works as I'd like, but I now need to find a way to transplant it into my DMS website. How do I do this? There are 3 components:

 

1. Stylesheets in the <head>

2. Some .js files in the <head>

3. The menu HTML code itself

 

I've tried pasting 1 and 2 in Custom > Custom Scripts but that immediately made things look terrible. 

 

My new navbar calls the following stylesheet:

<link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet">

Is that redundant because DMS already uses some form of bootstrap?

 

Regarding number 3: where in my child theme should I paste the html that makes up the menu? Do I put it in themes > dms-child > header.php

 

Sorry for the complex question but the default navbar isn't working and I really need this site working by tomorrow or Monday at the latest. 

 

Thanks, Russell

 

Share this post


Link to post
Share on other sites
Simon

You cannot include bootstrap3 css and javascript.

 

DMS has bootstrap2 built in, you will basically break everything.

 

You can disable the mobile menus easily with this:

add_action( 'pl_no_mobile_menu', '__return_true' );

Share this post


Link to post
Share on other sites
hrachovec

Hi Simon:

 

OK. Where do I add that code?

 

Cheers, R

 

Share this post


Link to post
Share on other sites
Simon

theme functions.php

 

You have created your own theme based on DMS right? Or is it a child theme?

Share this post


Link to post
Share on other sites
hrachovec

Thanks Simon.

 

I made a child theme which contains it's own functions.php file. I added in your code, removing navigation for people on a mobile isn't really a solution. I need people to be able to navigate around the site. 

 

I guess the sooner Pagelines can fix the glitch with their mobile nav on iPad and iPhones, the better. 

 

Thanks for your time though. 

 

Cheers, R

 

 

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×