Problem with meta box in Links

The hook you are after is edit_link (I couldn’t find any documentation). It’s fired from inside wp_insert_link (itself fired whenever a link is created or updated). The action only passes one argument, the link’s ID, to the callback. So you would need to change 2 to 1, on your add_action call: add_action( ‘edit_link’, ‘mytheme_save_data’, 10, … Read more

Setting multiple image urls using WordPress’ Media Uploader

There’re 2 things you should consider: change send_to_editor inside click callback. This will change this function only when needed, e.g. when uploader is shown. This also prevent unwanted things with global variables. You should always backup the send_to_editor. Here’s my sample code (not tested): jQuery(document).ready(function($) { $(‘#upload_image_button_main’).click(function() { var backup = window.send_to_editor; window.send_to_editor = function(html) … Read more

How to Create Dynamic Fields in a Meta Box?

You are looking for Repeatable Fields. Here in WPSE, it was covered in the following Q&A: Custom Meta Boxes: Store two values in one repeatable field A Gist: https://gist.github.com/2057532 Class helpers for building the plugin options page: Option Panel Class (from Bainternet, one of the house moderators) WPAlchemy_MetaBox PHP class

Loop with slider (slider not loading)

The simplest explanation is that the HTML rendered in your code does not match what you’re actually looking for. Without seeing the JS responsible for the slider, it’s impossible to say where you went wrong, but you should compare the mocked-up version (that works) with what you’re actually getting (HTML source after page render) to … Read more