I have a function whos purpose is to return some HTML ($offer_html) to display on my page. However, I´m seeing some strange things.
Below you see a div is added first to $offer_html (DIV is closing at the end).
$offer_html = '<div class="box middle offer alignleft">';
$offer_html .= '<p class="detail alignleft">' . $volum . '</p>';
$offer_html .= '<p class="detail alignleft">' . $produsent . '</p>';
$offer_html .= wpfp_link();
$offer_html .= '</div';
return $offer_html;
My problem is with the function wpfp_link(). The function returns HTML, but this HTML ends up totally misplaced. When the page renders, the HTML looks like this:
<img class="wpfp-img" title="Favorite" alt="Favorite" src="http://localhost:8888/wordpress/wp-content/plugins/wp-favorite-posts/img/remove.png">
<div class="box middle offer alignleft">
</div>
As you see, the HTML returned by the wpfp_link() ends up outside the DIV which I want it to be inside.
Does anyone know why this happens?