The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
13 views

wp_enqueue_script adds only the first script

function banana_scripts() { wp_enqueue_script('grid', get_stylesheet_directory_uri() . '/js/jquery.min.js', null, null); wp_enqueue_script('grid', get_stylesheet_directory_uri() . ...
0
votes
0answers
13 views

Export huge sites

I né ed to export data from a comple of sites that contain a lot of posts (tens of thousands). When I try to export all, the procedure fails, I get a partial WXR, so I have to export individual custom ...
0
votes
1answer
17 views

Dequeue set-post-thumbnail.min.js

Want to alter the behavior how set-post-thumbnail works (add additional functionality upon successful set post thumbnail). Looking on how to dequeue the stock set-post-thumbnail.min.js script so I can ...
0
votes
1answer
15 views

Run one-time script calling plugin functions

I want to add a product programmatically using a wordpress plugin but programmatically as entering it manually is a hassle. I have a little bit of programming experience. I found this: What is your ...
0
votes
1answer
37 views

How to properly dequeue scripts and styles in child theme?

I made a parent theme and a child theme in one of my project. I enqueued CSS and JavaScripts in my parent theme like below: function project_necessary_scripts() { //Stylesheets ...
0
votes
0answers
14 views

I would like to auto-install Wordpress on sub-domain

I am offering WordPress only hosting. I am using WHM/WHMCS automatically create a sub-domain and cpanel account for new clients after they place an order. I would like to automatically install ...
0
votes
1answer
34 views

jQuery functions work in console, but not live

I am trying to traverse the DOM in a number of places, replacing some of the content. jQuery('.homepage_buttons_text a[href^="http://danrobertsgroup.com/?attachment_id=1037"]').each(function(){ ...
0
votes
0answers
17 views

How to install another script with a multisite installation?

I'm running a WP multisite install that uses subdomains and domain mapping for networked sites. I need to install another script in the same cPanel (Blesta, for billing purposes). The only subdomain ...
0
votes
0answers
52 views

How to get a full functional wp_editor and colorpicker in tinyMCE popup

I'm trying to make a custom shortcode generator. I call a php document through AJAX in a tinyMCE popup. There, I'm trying to have a wp_editor instance. Also color picker. I'm not getting everything ...
0
votes
1answer
100 views

Call/Run a Mathematica (.m) Shell Script from Wordpress Page/Blog

Is it possible to run a Mathematica shell script from a Wordpress page or blog post? There doesn't seem to be a plugin available or way to do this. The script would need to take values inputted in ...
0
votes
1answer
12 views

WordPress menus - automatically generate

I want to automatically generate some menu items using a script (i.e. using wp_update_nav_menu_item). This would usually be a one-off event but I might want to repeat it if the menu items need ...
0
votes
0answers
34 views

How to figure out which plugin or theme is adding google analytics

Google-Analytics.js is being called on the website, but I can't figure out what is calling it. This is all the shows in the Dev Tools: <script async="" ...
1
vote
2answers
677 views

Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import - How?

Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import - How? Is there an easy quick way to do this? To delete all Pages, Posts, Comments and stuff that got imported? Or ...
0
votes
0answers
36 views

Echo outside HTML

I'm new to Wordpress and I want to echo a script and a css file inside the footer.php . This is the code that I use. echo "<script src='file.js'></script>"; echo '<link ...
0
votes
1answer
33 views

Disable load scripts and styles not working

I'm trying to disable the load of nextgen gallery 2.x styles and scripts, I used function mytheme_deregister_scripts_and_styles(){ $unwanted_scripts = array( 'photocrati_ajax' ); foreach ...
0
votes
0answers
33 views

custom script not loading at admin pages

I want to load a custom script on the admin pages. Seems simple right. Still, for some reason the script is not loading. I've tried putting this in my themes functions: add_action( ...
0
votes
1answer
34 views

Generating a static page from a script

I use a script to generate the ranking page http://joereddington.com/ranking.html from a script. Here's a relevant bit of the script: cat $DIR/start.html > $DESTINATION_PAGE grep -o ...
17
votes
8answers
2k views

What is your best practice to execute one-time scripts?

The Problem We all have been in a situation like this, and a lot of questions on this site need a solution like this. You either have to update a database, insert a lot of data automatically, convert ...
0
votes
1answer
24 views

Plugin's required JS not being inserted in my theme

All my plugins and their necessary .js files aren't being inserted in my theme's head. The CSS files are being inserted ok, but not the .js files. Not sure what's wrong. When I switch to a default ...
3
votes
2answers
262 views

Get list of scripts / styles and show file which enqueued them

I want to show what scripts and styles have loaded on a page and which plugin / theme / file has added them to the page. We can show all scripts and styles using: <?php global $wp_scripts, ...
0
votes
2answers
35 views

Register Script in Plugin Widget

I need to load a separate js file into a widget and just can't get it to work. So far I have if ( is_active_widget( false, false, $this->id_base, true ) ) { function tab_widget_scripts() { ...
0
votes
0answers
18 views

How to combine/minify prototype & scriptaculous and load it at the end? [duplicate]

Currently my WP 3.9.1 installation loads prototype and scriptaculous as follows: <script type="text/javascript" ...
0
votes
0answers
135 views

Manipulate database of WordPress site with my own scripts

I love WordPress as it provides plenty of great themes, good SEO and overall content management. But I'm not always happy with WordPress's original "Add post" and "Edit post" features as it required ...
0
votes
0answers
109 views

Wordpress GZip, Concatenation, Compression

I appreciate that I can define each of the following in wp-config.php and that each has its own merits, but is there any sense in defining all to work together? Compress CSS Compress Scripts ...
0
votes
1answer
192 views

Add class to comment form div when comment-reply button is clicked

I'm using the comment-reply script to move the comment form under thread when replying to a specific comment. Comment form is being displayed in theme with: <?php comment_form(); ?> The ...
1
vote
1answer
192 views

Overwrite or Replace code in WP_Footer

I have a some code being dynamically added into my Footer via add_action('wp_footer' ...). Unfortunately I'm not sure how to remove it using conventional methods, I've looked at the following question ...
0
votes
1answer
34 views

How to deregister scripts all at once

How can I deregister all wordpress scripts all at once except for the admin? I have looked at the discussion How can I de-register ALL styles all at once? And same with Javascript?, but i do not want ...
0
votes
1answer
49 views

change $src from wp_register_script in plugins/themes

I have a lot of plugins using external scripts from googleapis - these are throttled/blocked in China and it causes a lot of problems. Without rewriting the lines in all the plugins/themes and break ...
0
votes
3answers
579 views

How do I enqueue a JavaScript in my footer via the functions.php file?

Okay, so I'm well familiar with the way to properly enqueue a stylesheet or JavaScript in the WordPress header via the functions.php file. Recently though I came across a situation that has me ...
0
votes
0answers
147 views

How do I display the handle for all front-end enqueued scripts in plugin options page?

I use the following function in my plugin to display all the scripts handles in my plugin options page but it display only the handles of admin scripts: function my_detected_scripts() { global ...
3
votes
3answers
6k views

How to prevent wordpress from loading old versions of jquery in wp_head();?

I noticed my twenty twelve theme is including outdated versions of jquery and js so I want to replace the scripts with the newer versions, however the scripts are in the file included by wp_head() ...
2
votes
2answers
524 views

Correct Method to run scripts with dependencies without enqueue?

With enqueue you would change $deps to your script or array of scripts that are needed to run first for your script to work. <?php wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); ...
0
votes
0answers
61 views

How to exclude scripts from being moved to the footer using their handle?

I'm working on a small plugin that moves all scripts to the footer using the following code: function move_scripts_to_footer() { global $td_options; if ( !is_admin() and isset( ...
2
votes
2answers
3k views

WordPress Script Loading/Unloading — wp_deregister_script('jquery')

I have a few questions relating to WordPress loading / unloading up javascript tools. After reading a nicely written response to a question by Pieter Goosen, that got me to do a bit of studying and a ...
2
votes
1answer
2k views

How to get a jQuery script to run on a page?

I am having a hard time figuring out how to get a jQuery script to run on a Wordpress page of mine the "correct" way. I have followed this article and implemented what the first answer says to do. ...
1
vote
1answer
139 views

How to load library scripts in admin from plugins in noConflict wrapper?

For my plugin I need to make a meta box for some custom fields in my CPT (xyz), and to organize the fields, I need to implement tabs. And I's taught to load jQuery/JavaScripts using ...
0
votes
2answers
436 views

WP_ENQUEUE not working with Foundation 5 (resolved)

EDIT: PLEASE SEE MY ANSWER BELOW FOR ASSISTANCE :) feel free to use the code! I've recently started integrating Foundation 5.2.3 into Wordpress 3.9, and I am having issues with getting jquery to ...
0
votes
2answers
75 views

Register scripts located in child theme?

I'm having a lot of trouble registering scripts located in a child theme folder: This works fine: function register_scripts() { wp_register_script( 'newsletter', get_template_directory_uri() . ...
0
votes
1answer
42 views

Make different sites on multisite reference same script

I'm using multisite and want all my scripts to point to the same URL so they are optimized as well as they can be. Currently I have: http://www.site.com/news/wp-content/themes/js/bxslider.js ...
1
vote
1answer
25 views

Correct check for any admin page with editor

I have read the codex, but found it a bit incomplete. I like to load stuff only on pages where the post editor is visible. This should include custom post types and everything. I am a bit insure ...
0
votes
2answers
41 views

is there a way to get all queued scripts/styles into a template without `get_header()`?

in my main plugin page i check if a certain page is visited if so, i load a certain template. in the following way: add_filter( 'template_include', array($this, 'includeTemplate'), 99 ); public ...
0
votes
1answer
268 views

How to add GET variable after script url?

So, I've registered and enqueued my script. http://mysite.com/wp-content/plugins/my-plugin/script.js?ver=3.6 But how do I add a GET variable on the script src url? ...
2
votes
2answers
234 views

Setting up an API “listening” page

I need to create a PHP script that will receive data from another application via an HTTP post, process that data, and update the WordPress database. This script will run silently (i.e., no HTTP ...
3
votes
3answers
1k views

Editing Source Code in Wordpress

I am a senior in a college computer science program, and therefore have a decent knowledge of code and several languages. However, I am doing a summer internship type program, and the company I am ...
0
votes
1answer
71 views

Auto create description in post

I want to create a script for when I add a title and an image to a post, and then when i publish, i want it to auto create a description Something like . . . . . You are viewing [title of post]! ...
0
votes
1answer
106 views

Ajax navigation and scripts loaded only on certain pages

I'm building a theme. The theme post navigation is done through jQuery Ajax. I've been several plugins to see compatibility and I have a problem with the Ajax functionallity. Some plugins such as ...
1
vote
1answer
2k views

Script Code in Text Widget Does NOT Show

I have a self hosted Wordpress 3.7 and using the Twenty Thirteen theme. I have placed a text widget on the sidebar and put a simple code from Amazon inside it: <SCRIPT charset="utf-8" ...
3
votes
1answer
42 views

Listing registered scripts

Back story : We have a number of wordpress web sites experiencing issues when viewed on some IE8 browsers. The errors include the page loading but not being displayed (either a blank screen is ...
0
votes
1answer
61 views

JavaScript Libraries in WordPress

I understand that in order to use a JavaScript library in WordPress, such as jQuery, we have to use the following code to prevent conflicts: function my_scripts_method() { wp_enqueue_script( ...
1
vote
1answer
1k views

Add conversion/tracking pixel to <head> section for specific post

I need to add a tracking pixel for a Facebook ad to my Wordpress site. It should only be active for one blog post, not for every page on the site. How can I get the script into the HEAD section for ...