Jump to content


Photo
Hero Nav

Add a title to mobile-menu?



Best Answer Evan Mattson , 16 October 2013 - 04:12 PM

1.2 was released today which adds several hooks for you to do things like add a title or other content, or change the icon/text for the mobile toggle button.

 

For now the source is your only how-to, but I plan on putting together a little tutorial on my website for it soon.

 

Cheers

Go to the full post


  • Please log in to reply
10 replies to this topic

#1 flourishdesignstudio

flourishdesignstudio

    Advocate

  • Members

  • 265 posts
  • LocationIthaca, New York
  • Framework Version:all
  • Country: Country Flag

Posted 25 September 2013 - 06:31 PM

can I add a title to the mobile-friendly navigation, so that it appears to the left of the menu icon?



#2 Evan Mattson

Evan Mattson

    Super Member

  • Members

  • 227 posts
  • LocationAnn Arbor, MI
  • Framework Version:latest stable & beta releases
  • Country: Country Flag

Posted 26 September 2013 - 05:21 PM

Hey @flourishdesignstudio,

 

Your the first person to ask about this, but I think it's a good idea.

 

I'm not sure if justifies another option, but I may add a filter for it.  Are you familiar with WP hooks & filters?



#3 flourishdesignstudio

flourishdesignstudio

    Advocate

  • Members

  • 265 posts
  • LocationIthaca, New York
  • Framework Version:all
  • Country: Country Flag

Posted 26 September 2013 - 05:23 PM

Hi Evan! I've never used a hook, but it's been something that I want to learn if you can talk me through it. I already have a child theme created.



#4 Evan Mattson

Evan Mattson

    Super Member

  • Members

  • 227 posts
  • LocationAnn Arbor, MI
  • Framework Version:latest stable & beta releases
  • Country: Country Flag

Posted 26 September 2013 - 05:36 PM

Filters are really cool.

 

It's basically like a checkpoint during execution.  Filters pass some information, and then generally asks "anyone else want to do something with this?", at which point you can :)  You can either add to it however you wish, or even change it completely.

 

Hooks & filters are pretty much the same thing, the only difference is that filters require that you return some data back, where as actions don't do anything with a returned value.

 

There are many tutorials about how to use hooks and filters.  Perhaps I'll write one for betterdms.com :)

 

Stay tuned for an update.  The best way right now is probably just to follow me on twitter: @aaemnnosttv.



#5 Evan Mattson

Evan Mattson

    Super Member

  • Members

  • 227 posts
  • LocationAnn Arbor, MI
  • Framework Version:latest stable & beta releases
  • Country: Country Flag

Posted 03 October 2013 - 02:27 PM

I'm replying here rather than the other thread for the sake of relevance.

 

I haven't decided if I will make an option for the toggle text or not.  I think it's probably better to make it filterable, and then you can make it however you want.

 

Regarding whether most people recognize that as indicating a menu is there... I think this has been embraced as an unspoken standard in a big way.

 

There are many big websites and mobile apps (facebook for example) that use this symbol to toggle a menu.  Two big websites that come to mind are starbucks.com and theonion.com.

I don't think it's necessarily a bad idea to add a title/label next to it though.  The need for such a thing definitely depends on the audience of the website as well.

 

I'll post an update here when there is a solution :)



#6 Jake

Jake

    Advocate

  • Premium
  • 565 posts
  • LocationNC, USA
  • Country: Country Flag

Posted 03 October 2013 - 03:24 PM

Hi @flourishdesignstudio I agree with Evan, that's a great suggestion. In the meantime, you can start doing a little reading on the power of hooks at http://docs.pageline.../advanced/hooks which also links to a wonderful intro to hooks at http://wpcandy.com/t...ordpress-hooks/.



#7 Evan Mattson

Evan Mattson

    Super Member

  • Members

  • 227 posts
  • LocationAnn Arbor, MI
  • Framework Version:latest stable & beta releases
  • Country: Country Flag

Posted 16 October 2013 - 04:12 PM   Best Answer

1.2 was released today which adds several hooks for you to do things like add a title or other content, or change the icon/text for the mobile toggle button.

 

For now the source is your only how-to, but I plan on putting together a little tutorial on my website for it soon.

 

Cheers



#8 micstepl

micstepl

    Super Member

  • Members


  • 143 posts
  • LocationVIE
  • Framework Version:latest
  • Country: Country Flag

Posted 12 June 2014 - 07:12 AM

Where can I find the HeroNav HOOKS?



#9 micstepl

micstepl

    Super Member

  • Members


  • 143 posts
  • LocationVIE
  • Framework Version:latest
  • Country: Country Flag

Posted 12 June 2014 - 12:37 PM

1.2 was released today which adds several hooks for you to do things like add a title or other content, or change the icon/text for the mobile toggle button.

 

For now the source is your only how-to, but I plan on putting together a little tutorial on my website for it soon.

 

Cheers

Where can I find the HeroNav HOOK tagt allows to put HEADLINE into Mobile header?



#10 Evan Mattson

Evan Mattson

    Super Member

  • Members

  • 227 posts
  • LocationAnn Arbor, MI
  • Framework Version:latest stable & beta releases
  • Country: Country Flag

Posted 15 June 2014 - 03:48 AM

@micstepl,

 

The hooks are documented in the source.  If you're on the current version (1.3 as of this writing) you will find these starting around line 355 in plugins/hero-nav/sections/hero-nav/inc/HeroNav.php.  You will find several hooks there that you may find useful.



#11 sonaros

sonaros

    Advanced Member

  • Members
  • 49 posts
  • Country: Country Flag

Posted 27 August 2014 - 03:14 PM

Evan,

 

Would it be possible to post the what hook we should use and the code to get this to show up on Mobile only?

 

Thanks! 







Also tagged with one or more of these keywords: Hero Nav