WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As the title says I'm currently having some difficulties hiding the File URL option via jQuery.

I've been trying this:

// add_action( 'admin_footer-media.php', 'cor_remove_tr_file_url' );
add_action( 'admin_footer-media-new.php', 'cor_remove_tr_file_url' );
 * Removes the 'File URL' row
function cor_remove_tr_file_url() {

which works great on media.php, but somehow it isn't working on media-new.php.

Would someone perhaps know what I might be overlooking here?

enter image description here

share|improve this question
up vote 0 down vote accepted

This is because those elements aren't present when the page is finished loading, they're inserted later on using javascript.

Try hooking into #media-items and running your code when new elements are inserted rather than when the root element is ready.

share|improve this answer
Thanks, I wasn't aware of that. I'm now using a simple css version to hide things – Cor van Noorloos Mar 2 '12 at 15:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.