title: Wordpress - how to change absolute links to relative links
body: <p>I've just completed my first Wordpress site for a client and sent the files via FTP transfer to their server. I've just received the following comment back - </p>
  
  <p>"<em>...a few things don’t seem to be displaying properly, or linking correctly… It looks as though they’ve used absolute links instead of relative ones, so certain things aren’t pulling through properly...</em>"</p>
  
  <p>I didn't even realise this would be an issue as I assumed all the links would require changing anyway. Is there a code function that can go in the <code>functions.php</code> file to amend this? I've seen that there is a <code>wp_make_link_relative</code> and the following filters - </p>
  
  <pre><code>add_filter( 'post_link', 'wp_make_link_relative' );       // Normal post link
  add_filter( 'post_type_link', 'wp_make_link_relative' );  // Custom post type link
  add_filter( 'page_link', 'wp_make_link_relative' );       // Page link
  add_filter( 'attachment_link', 'wp_make_link_relative' ); // Attachment link
  add_filter( 'get_shortlink', 'wp_make_link_relative' );   // Shortlink
  </code></pre>
  
  <p>Should I apply these to my functions.php file? Will that fix everything or do I need to apply anything else, like a plugin?</p>