Please add an option to add HTML,Scripts before the end of body

shaulhadar
445 Posts
shaulhadar posted this 03 May 2015

Hello Themler Team.

I would like to have the option to also add scripts before the end of the body tag.
Currently the option is only working on the "Head" element.

There are some scripts sometimes that need to added before the end of the body, and if you have a number of page templates, you need to find each one and edit the script inside it. if we could have another window in the setting page, where you have all the additional html and css areas, just to add there a small area to add the scripts that come before the end of the body tag and than it would be the best!!

Thanks for your time and have a great day,

Shaul.

Hello Themler Team. I would like to have the option to also add scripts before the end of the body tag. Currently the option is only working on the "Head" element. There are some scripts sometimes that need to added before the end of the body, and if you have a number of page templates, you need to find each one and edit the script inside it. if we could have another window in the setting page, where you have all the additional html and css areas, just to add there a small area to add the scripts that come before the end of the body tag and than it would be the best!! Thanks for your time and have a great day, Shaul.
Vote to pay developers attention to this features or issue.
5 Comments
Order By: Standard | Newest
Stagger Lee
1831 Posts
Stagger Lee posted this 03 May 2015

The wp_footer action is triggered near the </body> tag of the user’s template by the wp_footer() function. Although this is theme-dependent, it is one of the most essential theme hooks, so it is fairly widely supported.

<pre class>function your_function() {
echo '&lt;p&gt;This is inserted at the bottom&lt;/p&gt;';
}
add_action('wp_footer', 'your_function');</pre>

Set priority of your action
If you want to influence the moment that your hook is executed, you can append an integer as 3rd argument to add_action:

The higher the number, the lower the priority and as a result your hook will be executed further down the page. Enqueued scripts are executed at priority level 20.

<pre class>function your_function() {
echo '&lt;p&gt;This is inserted at the bottom&lt;/p&gt;';
}
add_action('wp_footer', 'your_function', 100);</pre>

The wp_footer action is triggered near the &lt;/body&gt; tag of the user’s template by the wp_footer() function. Although this is theme-dependent, it is one of the most essential theme hooks, so it is fairly widely supported. &lt;pre class&gt;function your_function() { echo &#39;&amp;lt;p&amp;gt;This is inserted at the bottom&amp;lt;/p&amp;gt;&#39;; } add_action(&#39;wp_footer&#39;, &#39;your_function&#39;);&lt;/pre&gt; Set priority of your action If you want to influence the moment that your hook is executed, you can append an integer as 3rd argument to add_action: The higher the number, the lower the priority and as a result your hook will be executed further down the page. Enqueued scripts are executed at priority level 20. &lt;pre class&gt;function your_function() { echo &#39;&amp;lt;p&amp;gt;This is inserted at the bottom&amp;lt;/p&amp;gt;&#39;; } add_action(&#39;wp_footer&#39;, &#39;your_function&#39;, 100);&lt;/pre&gt;
Support Team
Support Team posted this 05 May 2015

Hi Shaul,

I've added your request to our wish list.
As a possible solution you can try adding HTML control with js to the bottom of the page (below the Footer).

Thank you,
Olivia

Hi Shaul, I've added your request to our wish list. As a possible solution you can try adding HTML control with js to the bottom of the page (below the Footer). Thank you, Olivia
shaulhadar
445 Posts
shaulhadar posted this 06 May 2015

Thanks Olivia!

Thanks Olivia!
jacojashi
52 Posts
jacojashi posted this 06 May 2015

Be careful. I've destroyed my template when embeed translator code like this in custom html, code from google

<div id></div>
Click save&publish (yes,i could give just save and test before publish... ) and
...Sorry error ocured....
Maybe i do something wrong with code..., BTW BACKUP, BACKUP
I don't report yet to support

Be careful. I've destroyed my template when embeed translator code like this in custom html, code from google &lt;div id&gt;&lt;/div&gt; Click save&publish (yes,i could give just save and test before publish... ) and ...Sorry error ocured.... Maybe i do something wrong with code..., BTW BACKUP, BACKUP I don't report yet to support
Support Team
Support Team posted this 06 May 2015

Jacek,

I've destroyed my template when embeed translator code like this in custom html, code from google

I've tested google translation script on my side and everything is ok.
If you need our assistance with this issue please create a separate topic.

Thank you,
Olivia

Jacek, > I've destroyed my template when embeed translator code like this in custom html, code from google I've tested google [translation script][1] on my side and everything is ok. If you need our assistance with this issue please create a separate topic. Thank you, Olivia [1]: https://translate.google.com/manager/website/add
You must log in or register to leave comments