Reputation: 860
I am working on loading a template part into my theme. The get_template_part(); function works the way it is supposed to be, but it always inserts an empty line before itself.
Here is how it looks in the firebug:
This is how it's coded in php:
This is the content of polecane.php, only one line:
What might be the problem? I have to get rid of that empty line because it messes up my layout.
EDIT: This does NOT work:
<div class="homepageright"><?php get_template_part('polecane'); ?></div>
Upvotes: 0
Views: 173
Reputation: 860
I've found the solution. DaveChen's idea with BOM was good, I simply changed the charset for one file only, istead of doing it for both of them. Thank you, now it works.
Answer: Set encoding to UTF-8 without BOM for every file involved.
Upvotes: 2
Reputation: 1769
Try this:
<div class="homepageright"><?php get_template_part('polecane'); ?></div>
Upvotes: 0