title: Wordpress/Custom field Youtube / I want to replace video url (watch?v= with /v/) with php
body: <p>I want to replace in post and archive custom field the youtube url with php.</p>
  
  <ul>
  <li>From: <a href="http://www.youtube.com/watch?v=FKAjQfL31Dw" rel="nofollow noreferrer">http://www.youtube.com/watch?v=FKAjQfL31Dw</a> To:</li>
  <li><a href="http://www.youtube.com/v/FKAjQfL31Dw" rel="nofollow noreferrer">http://www.youtube.com/v/FKAjQfL31Dw</a></li>
  </ul>
  
  <p>My code is:</p>
  
  <pre><code>&lt;?php if ( get_post_meta($post-&gt;ID, 'ixosrip', true) ) { ?&gt;
  &lt;embed style="width:150px;height:25px;" allowfullscreen="false" type="application/x-shockwave-flash" src="http://www.youtube.com/v/&lt;?php echo get_post_meta($post-&gt;ID, "ixosrip", $single = true); ?&gt;&amp;amp;ap=%2526fmt%3D18&amp;amp;autoplay=0&amp;amp;rel=0&amp;amp;fs=1&amp;amp;color1=0xC0C0C0&amp;amp;color2=0xFFFFFF&amp;amp;border=0&amp;amp;loop=0"&gt;
  &lt;?php } else { ?&gt;
  &lt;em&gt;No sound&lt;/em&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>Current i use a javascript, taked from here: <a href="https://stackoverflow.com/questions/1712847/find-all-youtube-links-with-js-jquery/1713320#1713320">find all youtube links with js (jquery)</a> / But its loads very slow my site.
  Is there any way to do this with php in the custom field?</p>
  
  <p>Thank you.
  David.</p>