I’m converting a precoded website to wordpress based website.
All the URLs are currently img/file_name
In wordpress im using a basic page.php
with 3 functions, get_header() get_body() get_footer()
in which my pages are split into 3 parts and the middle content is made into wordpress page posts.
The middle content often contains images, how do I go about linking to them correctly?
Where should I put the img folder as what path should I call, i dont know where im referencing from with wordpress being dynamic.
At the moment img is in my theme directory and the images are missing. Are they not relative to page.php which is inside my theme also?
If the images are in your theme folder, you can use the get_stylesheet_directory_uri() function.
http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri
You should put the images in the
wp-content/uploads
folder.You would like using “http://www.yoursite.com/wp-content/uploads/2014/01/yourimage.jpg
WordPress allows you to add pictures (and more) when adding/editing articles and posts
Take a look at -> http://codex.wordpress.org/Using_Images which also covers working with images in themes.