Archived

This topic is now archived and is closed to further replies.

  • 0

Pagelines hook for After </html> tag


Question

Posted · Report post

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!

Share this post


Link to post
Share on other sites

4 answers to this question

Posted · Report post

There is no hooks after </html>.

 

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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?

Share this post


Link to post
Share on other sites

Posted · Report post

Hi there,

 

There's a pagelines_before_html, not one for after though. A full list of hooks can be found here - http://api.pagelines.com/hooks

Share this post


Link to post
Share on other sites