Jump to content


Photo
- - - - -

Looking for a hook


  • Please log in to reply
13 replies to this topic

#1 Guido

Guido

    Advanced Member

  • Members

  • 48 posts
  • Country: Country Flag

Posted 22 January 2013 - 03:27 PM

Hi,

 

i want to put content right beside the logo in the fixed nav bar. Do we have a hook there and whats the name of it?



#2 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 22 January 2013 - 03:31 PM

There should be. To add content using hooks more easily, please use this plugin:

Please Login or Register to see this Hidden Content



#3 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 22 January 2013 - 03:47 PM

Alternatively install the free actionmap plugin from the store, it highlights all available hooks on your page.



#4 Guido

Guido

    Advanced Member

  • Members

  • 48 posts
  • Country: Country Flag

Posted 22 January 2013 - 10:29 PM

There is no hook to place something inside the fixed navbar - just above or under the navbar hooks are available.



#5 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 22 January 2013 - 11:04 PM

Depending on the scope or volume of the content, you may use a menu-item in Dashboard > Appearance > Menus to add a non-linking Custom Link.

 

Just put # in place of the link, and a very small amount of text in the Label field.  I'd say under 45 characters. More than that and it probably should not be in the NavBar.



#6 ellenmva

ellenmva

    Advocate

  • Members

  • 338 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 23 January 2013 - 01:25 PM

If you are not using the search in the navbar you could use the hook get_search_form and replace the function.  Just a thought, not necessarily a solution.

 

Ellen



#7 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 23 January 2013 - 10:15 PM

Thank you for contributing an excellent idea Ellen!



#8 Guido

Guido

    Advanced Member

  • Members

  • 48 posts
  • Country: Country Flag

Posted 04 February 2013 - 09:12 AM

This could be a good solution, thank you!

My post is regarding the blog description ( - "just another wordpress blog"), i think it should be possible to add it as text on the right side of the logo in the fixed nav bar. This could also be a suggestion for further developement of Pagelines. At the moment i wrote the blog description into the logo.png, which is of course not as good as real text.

 

To utilize the hook get_search_form form for that purpose, would it be possible to place the whole code in the functions.php? If yes, could somebody please provide the code?



#9 Danny

Danny

    Is Awesome!

  • Moderators
  • 17015 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 04 February 2013 - 10:41 AM

The simplest way to add your tagline, would be to add it to the logo image it self. You can use a free program called GIMP or Adobe Photoshop to edit your image.



#10 Guido

Guido

    Advanced Member

  • Members

  • 48 posts
  • Country: Country Flag

Posted 04 February 2013 - 02:31 PM

 At the moment i wrote the blog description into the logo.png, which is of course not as good as real text

 

 

That´s exactly what i did - the idea was to add it with a hook, e.g. the get_search_form hook in case it is not used for the search form.



#11 ellenmva

ellenmva

    Advocate

  • Members

  • 338 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 04 February 2013 - 03:30 PM

Hi Guido,

 

Since I made the suggestion here is some help with the hook.  You'll have to do some css styling to get it to display in the position you want but this is a start.

 

Please Login or Register to see this Hidden Content

 

The search form will still be there.  If you want to override the search form change add_filter to add_action.

 

Good luck!

 

Ellen



#12 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 04 February 2013 - 09:38 PM

Hi Guido...

 

Have you tried using the Action Map plugin to identify the best hook?



#13 Guido

Guido

    Advanced Member

  • Members

  • 48 posts
  • Country: Country Flag

Posted 05 February 2013 - 10:33 PM

@Ellen Thank you for the code, i will try it out an post a feedback :-)

 

@Rob Yes i did, there is a hook above the fixed navbar an after the fixed navbar - but no inside. For me it still looks like the get_search_form hook is the only one.



#14 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 06 February 2013 - 01:28 AM

Guido,

 

I'm not sure how long this description is, or what's in your menu, but if you are concerned with SEO issues, the menu really isn't a good place to add a tagline. The search engines would see it as a menu item, not as a tagline, so it will not be included properly in search results.

 

Try this:

If you have the ContentBox section installed and activated, go to Dashboard > PageLines > Drag & Drop and add the Content Box in the Header, directly under Branding.

Go then to Dashboard > PageLines > Page Options > Site Defaults > Content Box.  The first line lets you enter a unique term for a class.  Make sure this is a most unique word.  It may contain numbers, dashes ( - ) or underscores ( _ ) or letters, but no punctuation or spaces.  The next box down, you'll see an area where you may type your tagline. Save.

 

Next, view the site.  The content box with the tag line should be below the branding logo.  Using Firefox or Chrome's Inspection Tool, you can find the element which is the entire content box.  Move this using margins, to where you want it placed.  Then, using the unique class you created, style the text you added, changing the font color, font selection, size, etc.

 

This will be fully searchable by the bots, and you will have it placed exactly where you desire.