Jump to content

Pagelines hook for After </html> tag

Recommended Posts


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

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

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post

Link to post
Share on other sites

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
James B

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

Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post

Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • Grant Turck
      By Grant Turck+
      What file do I need to add code to in my pl-framework-pagelines child theme to insert script after opening body tag on every page?
      Can you someone provide me with the code also?
    • Le Chef Est Une Femme
      By Le Chef Est Une Femme+
      Hey everyone
      I am very sorry if this question has a "deja vu"  taste but I have been looking for more than 2 hours a way to add a phone number in the top right corner of my header website.
      Before asking that, I have read many of the questions related to that subject, from hooks and action map to function.php and hooker plugin but I am very lost. Plus many links kindly given by some of you are now 404 pages
      Is there anyone willing to help me find the easiest way to add this number please ? 
      In advance, thank you 
    • JasonLA
      By JasonLA+
      Hey guys, 
      I have read a few other posts about this for Facebook but do not understand hooks.
      Could someone please explain how to use a hook in easier terms please? I am not very code savvy. I need to know exactly what to enter in and where it belongs. In the hook documentation this is not very clear at all.
      This is the page I need the code placed on; it's what users are taken to after they submit a form on the page before it: 
      Here is what I have put together from the Docs so far. I put this in my custom CSS and it did not work. 
      Any help is much appreciated!
    • ketri
      By ketri

      I'm using Types -plugin to add a field where the site owner can upload a PDF to each post. 
      On a category page I want to show the titles of the posts as links to these PDFs. The articles are only for pdfs, there is no content, exceprt, thumbnails etc. ever.

      So I should probably use a hook to insert a link to the PDF on the archive pages. I've tried using
      add_action('the_post', 'postFunction', 10);     function postFunction() {        echo "<h1>pdf link here</h1>"; } Just to get me started before I figure out the details of what to add. It now adds the code before the title on archive pages. But it also adds that code pretty much everywhere. https://www.dropbox.com/s/0p70s2h3sx0pjj0/Screenshot%202014-08-20%2010.07.31.png
      So how can I use a hook to add something to category pages?
      I'd also like to remove the title/link to the actual post, and the read more button.

      Thank you!

    • sblentlinger
      By sblentlinger
      Hi, I am trying to use hooks in Pagelines DMS to offset a 'Login' link, a 'Sign Up' button, and a 'Contact' text on the Fixed Navbar.  It looks fine when the browser is at least the width of the full website:
      [attachment=1878:Screen Shot 2014-01-03 at 2.05.00 PM.png]
      However, when resizing the browser or viewing my site on mobile it seems to create a new section off the page for the hooks:

      [attachment=1879:Screen Shot 2014-01-03 at 2.05.12 PM.png]
      My website is currently on a staging server, and can be accessed at payline.staging.wpengine.com 
      I would ideally like to have these items still appear on the Navbar.  Can you please help identify the issue and direct me towards a resolution?