Display URL in a Custom Field

You are using get_the_title(), which needs to be echoed out. However, you have it inside the string. Also, you might want to use isset() rather than !empty(). Try this: if( isset( $destino_web ) && $destino_web !== ”) { echo sprintf(‘<p><strong>Web:</strong><a href=”https://wordpress.stackexchange.com/questions/168579/%s”>%s</a></p>’, $destino_web, get_the_title() ); }

Add / Update Custom Fields After Select Pictures in Media Window

I modify my jquery / js like this.. $(document).ready(function(){ // $(‘#insert-my-media’).click(open_media_window); if($(‘#images_id’).val() != ” && $(‘#images_url’).val() != ”){ $(‘#open_media’).text(“Edit Slider”); } $(‘#open_media’).click(function(e){ e.preventDefault(); var target = $(‘#images_id’); var target_url = $(‘#images_url’); var btnSave = $(‘#publishing-action input.button’); if(target.val() == ” && target_url.val() == ”){ var wpmedia = wp.media({ title: ‘Insert a media’, library: {type:’image’}, multiple: true, … Read more