Would like to be able to dynamically redirect my custom post to external url link that is in the custom url field in that post.
I am using the following:
$(window).attr('location', "<?php echo rwmb_meta( 'extrnl_url' )>;");
$(location).attr('href', "<?php echo rwmb_meta( 'extrnl_url' ) ?>;");
However this is not working. if I replace this <?php echo ?> with a fixed url, this script works. any help on this is greatly appreciated