Inserting javascript with script tags
-
Hello, i am a developer who has come up with a widget that uses JavaScript. I have WordPress users who want to use it on their site. They arent technical. I do not have access to their account. They are on thr premium but not business plan. Is there anyway to edit on the WordPress .com hosted site the config file to remove the filtering out of script tags? Or the header/footer file to include script tags? As i understand it the plugins that allow custom JavaScript require business plan which he does not have. Thanks.
WP.com: Yes
Correct account: UnknownThe blog I need help with is: (visible only to logged in users)
-
-
Hi there!
It’s not possible to use javascript or similar code on sites below the WordPress.com Business plan. You can check out this page that has more information about accepted types of code on WordPress.com: https://wordpress.com/support/code/
Hope that helps!
-
Hello,
From my understanding there were ways to edit various files. Are any of these methods dooable via a wordpress hosted premium plan site:
Edit Your Child Theme’s functions.php File
Appearance > theme editor

# 2 editing wp_kses_allowed_html and functions.php
wp_kses_allowed_html will allow you to add these two HTML tags. Add the following code to your functions.php file to enable them.#3
editing header.php or footer.php:
https://webdesign.tutsplus.com/tutorials/how-to-add-custom-javascript-to-your-wordpress-site–cms-34368Even though the easiest way to add a custom script to your WordPress site is by dropping a
<?php
}
add_action(‘wp_head’, ‘wpb_hook_javascript’);Best,
E. -
Please note the client is unwilling to upgrade to business from premium, so i am looking at these other methods.
-
The sites you quote are not about the wordpress.com platform but about sites using the open source wordpress.org.
The methods you describe are only possible on a site using the open source wordpress.org or on the wordpress.com if you upgrade to the Business plan. -
-
-
I think if will help if I clarify that we are not the only providers of WordPress sites, and other hosting companies also happen to offer WordPress sites, but they use a different version of the platform than what we use here. See http://support.wordpress.com/com-vs-org/ for more info.
In this context it’s probably easiest to think of us as a “managed host” where we fully control the WordPress environment so it is as stable, secure, and trouble free as possible. This may be why your client was attracted to us in the first place as it’s much easier for someone new to WordPress to start a site here vs. going through the more technical setup process on other hosts.
However, because we are a managed host, we do not allow plugins and custom code on our lower-level sites. For these sites their simplicity is what makes them so stable and easy to use. It is possible to add plugins/3rd party themes/custom code, but it does require an upgrade to our Business Plan or higher: https://wordpress.com/pricing/
For many site owners this is the sweet spot where they enjoy the excellent security, stability, and in-house support we offer all sites, but with the added advantage of being able to add plugins, outside themes, and do custom development.
For your client, it sounds like pricing is an issue and in that case they do have the option to migrate their WordPress.com site to a self-hosted WordPress site, which are sites that you create on a “traditional web host” like Bluehost, GoDaddy, etc. This will allow plugins, 3rd party themes, and custom development, but without the managed features and in-house support that we add here on WordPress.com.
I hope this helps clarify things but of course if you have any questions at all we’re happy to address those for you. :)
- The topic ‘Inserting javascript with script tags’ is closed to new replies.