• 0
Sign in to follow this  
Followers 0

DMS 2 Edit HTML of home page logo link


Question

Posted · Report post

Hello:

 

Is there any way to tweak the <a> tag that surround the logo link in the navbar? I want to add 'id' and 'rel' attributes to it which will aid in helping me achieve a certain effect. 

 

For example, it's currently:

 

<a href="http://brightldn.com/new/">

 

I want to change it to:

 

<a href="http://brightldn.com/new/#home" rel="m_PageScroll2id" >

 

Thanks!

 

R

 

 

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0

Posted · Report post

Hi,

 

There are two ways you can achieve this, you can either use a hook via the navbar_brand filter or create a child of the NavBar section via a Child theme and add your own HTML attributes there.

 

If you go down the child section, you're free to use my child theme here - http://dannyholt.github.io/skeleton/

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks Danny. I'll give that a try. I was already using a child theme, so I guess I'll figure out how to create a child of the NavBar section in there. I'll come back with any problems. 

 

Thanks! R

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

You could even use jQuery to change it.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

@Simon_P: I'm not too confident w jQuery but I may investigate if I can't achieve what I'm looking for through another method. Thanks though. 

 

@Danny: OK, I've tried to setup a new navbar section in my DMS child theme. Specifically, I made a new file here:

 

themes/dms-child/sections/navi/section.php

 

I did a little tweaking to the code in section.php but didn't see any change on my public facing site. Am I not doing this correctly?

 

Cheers, R

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

What do you mean you made a new file ? You need to copy all the sections folders and files, then customize the code in the sections.php file.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

simple with js

 

https://gist.github.com/Pross/f5119fc4cfb6d538ddfe

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hey Danny and Simon:

 

Thanks for the replies. I'll come back to this later and try to update it as per your instructions. Just trying to iron out some larger issues at the moment.

 

Cheers, R

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
Sign in to follow this  
Followers 0