auf den unterseiten wird der bildtitel (caption="...") unter dem bild angezeigt. auf der startseite jedoch nicht. weiss jemand, wie man den code abwandeln kann, damit das auch auf der startseite klappt?
anbei ein bisschen code aus der functions.php , der evtl entscheidend sein könnte:
// Theme contents
function theme_content($readmore) {
$content = get_the_content($readmore);
$content = preg_replace("/<img[^>]+\>/i", "", $content);
$content = preg_replace('/\[.+\]/','', $content);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
// image grabber function
function resize($w,$h,$class='alignleft',$showlink=true) {
global $more, $post;
$title = the_title_attribute('echo=0');
if($showlink) {
$link = "<a href='".get_permalink()."' title='$title'>";
$linkend = "</a>";
} else {
$link ="";
$linkend="";
}
$more = 1;
$content = get_the_content();
$pattern = '/<img[^>]+src[\\s=\'"]';
$pattern .= '+([^"\'>\\s]+)/is';
$more = 0;
if(preg_match($pattern,$content,$match)) {
$theImage = "$link<img src=\"$match[1]\" class=\"$class\" alt=\"$title\" width=\"$w\" height=\"$h\" />$linkend\n\n";
return $theImage;
}
}
<style type="text/css">
body { width: <?php echo $pbt_site; ?>px; }
#mainwrapper { width: <?php echo $pbt_site-20; ?>px; }
#sidebar { width: <?php echo $pbt_sidebar; ?>px; }
#sidebar .side-widget { width: <?php echo $pbt_sidewidget; ?>px; }
<?php if(!empty($pbt_secondsidebar)) { ?>
#secondsidebar { width: <?php echo $pbt_secondsidebar; ?>px; }
#secondsidebar .side-widget { width: <?php echo $pbt_sidewidget2; ?>px; }
<?php } ?>
#leftcontent, #twocol, #threecol, #threecol2, .commentlist { width: <?php echo $pbt_content; ?>px; }
#leftcontent img, .wp-caption { max-width: <?php echo $pbt_content; ?>px; }
#leftcontent .wp-caption img, #leftcontent .gallery-thumb img { max-width: <?php echo $pbt_content-12; ?>px; }
<!-- fix for IE & Safari -->
.threepost embed { width: <?php echo ($pbt_content*.29); ?>px !important; }
.twopost embed { width: <?php echo ($pbt_content*.46); ?>px !important; }
<!-- end fix for Safari -->
</style>
<?php
}