Hi I have a small website im doing for a customer and I have used a html/css-site and transferred it to wordpress by using blank theme. So far so good, have a look at energyshop
This is because you're using relative paths. When creating a WordPress theme and you want to load resources from your theme, you should use absolute paths. There are two template tags that make this easy for you: get_bloginfo()
and bloginfo()
. The first one returns the value, and the second one echoes the value(that you request via the first argument passed to the function).
So in order to display an image, you should have:
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/icon_en_global.png" alt="English.png">
This will always result in this(for your site):
<img src="http://energyshop.se/wp-content/themes/blank/images/icon_en_global.png" alt="English.png">
So simply replace all wp-content/themes/blank
with <?php bloginfo('stylesheet_directory'); ?>
.