Media Playlist Plugin

Here’s a quick example showing how you would pass php data to your script. First, we hook our function to the wp_enqueue_scripts action. Inside, we enqueue the script that contains the player and initialization code (this is probably two separate files, but I’ve condensed it to a single file in this example). Next, we call … Read more

jQuery + more won’t load in header

WordPress’s wp_register_script has an $in_footer parameter which allows you to state if the script should be written to wp_head or wp_footer. By default the value is false (don’t show in footer), but you could try it yourself. Replace your wp_register_script with this: wp_register_script( ‘jquery’, ‘//ajax.googleapis.com/ajax/libs/jquery/’. $jquery_ver .’/jquery.min.js’, ”, ”, false );

How would I get this to work – send to post from thick box

The correct way to do this is to: $(‘#upload-background-image-one’).click(function() { formfield = $(‘#background-size-one’).attr(‘name’); tb_show(”, ‘media-upload.php?type=image&TB_iframe=true’); // Take the selected image and insert only the src path into the text field. window.send_to_editor = function(html) { img_url = $(‘img’, html).attr(‘src’); $(‘#background-size-one’).val(img_url); tb_remove(); } return false; }); because when you click on a button you instantiate a call … Read more

Displaying contents of a tab

You have been answered in stackoverflow in the following way: <div id=”tab-one” style=”display: none”>Tab1 info 1 content</div> <div id=”tab-two” style=”display: none”>Tab1 info 2 content</div> <div id=”tab-three” style=”display: none”>Tab1 info 3 content</div> <ul class=”side bar tabs”> <li class=”one”>Tab1 info 1</li> <li class=”two”>Tab1 info 2</li> <li class=”three”>Tab1 info 3</li> </ul> You should run your query in while … Read more

Creating custom URL for async content

In general the pretty permalinks are domain of Rewrite API in WordPress. But they convert the links into query variables for back–end PHP side of it. Hashbang links are domain of JavaScript. It is impossible to say how easy would be to change them, without very specific knowledge of how theme’s JS implements them.