Jump to content


Photo
- - - - -

Adding banner image to header

header banner header.php

Best Answer Martin Davies , 01 April 2014 - 01:46 AM

I think you might be misunderstanding hooks. 

 

 

Hooks in PageLines Framework essentially allow you to manipulate or insert code without editing core files.There are two types of hook, these are actions and filters.

Action Hooks

Action Hooks allow you to insert additional code and, there by, customise the code to do additional functions at designated points in PageLines Framework.

Filter Hooks

Filter Hooks are used to manipulate code output and return a variable. An example of this would be to add a text, a link or even an image to the end of the content on your blog posts or pages.

To put it more elegantly, you can change things that are hard-coded with filters, and you can add things using actions.

For more information on what hook actions and filters are, see WordPress documentation Plugin API. There is also an excellent article by WP Candy on hooks here

 

You can use the hooker plugin to add a hook and the action map plugin to see all the available places to add your hook to. 

 

You can get either of those plugins here https://www.dropbox....ded-content.zip

Go to the full post


  • Please log in to reply
9 replies to this topic

#1 kellid

kellid

    Super Member

  • Members
  • 187 posts
  • Country: Country Flag

Posted 31 March 2014 - 08:30 PM

Hello,

 

I'm trying to add a banner image in the header of my site between the logo and drop down login box to the right.  I've added code to my header.php file but it's above the header and not nested between these two points.  

 

[post='

']Here[/post] is the code i've used in my header.php file and here is the site...

 

Please Login or Register to see this Hidden Content

 

I am using pagelines framework, not DMS version 2.2.5.  

 

Any guidance with this would be Greatly appreciated!

 

Thank You!

 

Kelli



#2 Martin Davies

Martin Davies

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 31 March 2014 - 11:59 PM

Try using a hook instead 

 

You can see the help on hooks here 

Please Login or Register to see this Hidden Content



#3 kellid

kellid

    Super Member

  • Members
  • 187 posts
  • Country: Country Flag

Posted 01 April 2014 - 01:28 AM

Thanks for the response Martin!  But these hooks are for DMS, I'm still using Framework for this site.  Do you have a list for Framework hooks or would you know off hand which I would need to add an image banner to the right of my logo?

 

Thanks!



#4 Martin Davies

Martin Davies

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 01 April 2014 - 01:37 AM

Yikes - my bad - the docs for Framework are here 

Please Login or Register to see this Hidden Content



#5 kellid

kellid

    Super Member

  • Members
  • 187 posts
  • Country: Country Flag

Posted 01 April 2014 - 01:45 AM

Thank you, that's the link you sent before the but page where the Framework hooks are supposed to be is blank.  

 

Any idea where else i can find a list of hooks for FRamework?

 

Thank you!!



#6 Martin Davies

Martin Davies

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 01 April 2014 - 01:46 AM   Best Answer

I think you might be misunderstanding hooks. 

 

 

Hooks in PageLines Framework essentially allow you to manipulate or insert code without editing core files.There are two types of hook, these are actions and filters.

Action Hooks

Action Hooks allow you to insert additional code and, there by, customise the code to do additional functions at designated points in PageLines Framework.

Filter Hooks

Filter Hooks are used to manipulate code output and return a variable. An example of this would be to add a text, a link or even an image to the end of the content on your blog posts or pages.

To put it more elegantly, you can change things that are hard-coded with filters, and you can add things using actions.

For more information on what hook actions and filters are, see WordPress documentation 

Please Login or Register to see this Hidden Content

. There is also an excellent article by WP Candy on hooks 

Please Login or Register to see this Hidden Content

 

You can use the hooker plugin to add a hook and the action map plugin to see all the available places to add your hook to. 

 

You can get either of those plugins here 

Please Login or Register to see this Hidden Content



#7 kellid

kellid

    Super Member

  • Members
  • 187 posts
  • Country: Country Flag

Posted 01 April 2014 - 02:20 AM

Hooker!!  Exactly what I needed, on the right path.  Thank You!!



#8 kellid

kellid

    Super Member

  • Members
  • 187 posts
  • Country: Country Flag

Posted 01 April 2014 - 04:11 AM

Martin!  

 

I have the image in the header exactly where I want it but now the link is not working.  It's hidden behind the section brand, I tried to use this code in css but it's not working.  Any idea how to get the link to work?

 

.section-branding .branding_wrap {z-index: -1;}



#9 kellid

kellid

    Super Member

  • Members
  • 187 posts
  • Country: Country Flag

Posted 01 April 2014 - 04:25 AM

Got it!!  changed the z-index :)  

 

So sorry to bother you!!



#10 Martin Davies

Martin Davies

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 01 April 2014 - 02:10 PM

no problem - thank you for letting us know :) 







Also tagged with one or more of these keywords: header, banner, header.php