Handling URLs in WordPress application

../directory1/directory2/directory3/css/stylesheet.css should get you there if I am reading your description accurately. However, I would be very cautious using relative links in WordPress. They do not always work the way you’d expect because a lot of ‘directories’ don’t actually exist. They are fabricated by WordPress and mod_rewrite. The two conspire to lie about filesystem structure. … Read more

javaScript in section of WP API

Uncaught TypeError: Property ‘$’ of object [object Object] is not a function Are you positive you’re accessing the jQuery object correctly? You should look into how WordPress uses noConflict mode. In the noConflict() mode, the global $ shortcut for jQuery is not available, but you can still use: jQuery(document).ready(function(){ jQuery(#somefunction) … }); As a footnote, … Read more

3.5 media.editor: what is the event listener for choosing an image?

Found out that overriding some of the wp.media.editor objects methods is the best solution, because it allows you to customize the event handling, but will also preserve a lot of the backend processing and handling that WP has in place for processing images. I basically overrode wp.media.editor.send.attachment, wp.media.gallery.shortcode with my own methods, and wp.media.editor.remove, in … Read more

javascript onload calling a function of a plugin

I did not test this, but something like this should work. Edit the function all_js in your plugin file and add these lines: $.post(“/wp-admin/admin-ajax.php”, { idPost: $(“.post-read”).data(“id”), action: “read” }, function(response) { // Handle errors etc. }); You also need to ensure that the button data changes when the AJAX request is made. Here is … Read more

wp_enqueue JavaScript in child-theme (ReferenceError) using Search & Go

I enqueued the child script the right way and made the first Reference Error (eltdGlobalVars) disappear as follows: In functions.php in child I removed lines that dequeue the script “search_and_go_elated_listing”. Then I enqueued it using a copy of the function with the same name as the pluggable function in parent: “search_and_go_elated_listing_assets”. Within this copy I … Read more