thesis_hook_before_content
Beschreibung
Liefert einen gewünschten Text oder Funktion vor dem Inhalt einer Seite oder Post. Die Informationen von thesis_hook_before_content werden innerhalb des “content”-DIVs ausgegeben, jedoch vor format_text, also dem eigentlichen Inhalt der Seite & Post.
Verwendung
Mit dieser Funktion lassen sie bspw. einfach Google Adsense oder der berühmte Facebook-Like Button oberhalb eines jeden Blog Eintrages oder Seite integrieren.
Beispiel
<?php
function add_facebook () {
if (is_single()):
echo '<iframe src="http://www.facebook.com/widgets/like.php?href=' . the_permalink() . ' " scrolling="no" frameborder="0" style="border:none; width:450px;height:30px"></iframe>';
endif;
}
add_action('thesis_hook_after_post', 'add_facebook');
?>