Jump to content


Photo
- - - - -

Pagelines hook for After </html> tag

hook

  • Please log in to reply
4 replies to this topic

#1 netmorerealtor

netmorerealtor

    Newbie

  • Members
  • Pip
  • 7 posts
  • Country: Country Flag

Posted 05 March 2013 - 04:25 PM

I want to add my own javascripts in function.php file instead of the Footer Script section in "Custom CSS".

 

Is there a pagelines specific hook I can use in "add_action()" so the script tags will appear after </html> tag?

 

Your help is highly appreciated!



#2 catrina

catrina

    Advocate

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

Posted 05 March 2013 - 05:09 PM

I'm not sure if there is a specific hook for this. What javascripts are you trying to add to your site?



#3 netmorerealtor

netmorerealtor

    Newbie

  • Members
  • Pip
  • 7 posts
  • Country: Country Flag

Posted 05 March 2013 - 05:12 PM

It's going to be some jQuery scripts for manipulating existing html tags, I might want to add classes or remove classes for example. So is it best pratice to add scripts at the bottom of the page for site performance? I am thinking maybe I can add it in "wp-footer" hook. What's your advice?



#4 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 06 March 2013 - 02:36 AM

Hi there,

 

There's a pagelines_before_html, not one for after though. A full list of hooks can be found here -

Please Login or Register to see this Hidden Content



#5 Simon_P

Simon_P

    Messer

  • Administrators



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

Posted 06 March 2013 - 03:36 PM

There is no hooks after </html>.

 

the last hook is a wordpress one that james mentioned wp_footer.