Tagged: related posts, title
Hi,
I refer to this post, because I would like to achieve the same: titles below the related post items:
https://kriesi.at/support/topic/title-under-featured-image-in-related-posts#post-119448
But something must be wrong with the characters of the code, that the user suggests:
$output .= " ID)."'>".$related_post->post_title."";
I don’t know PHP right, but Notepad++ shows all the following code in grey, means, that there is in the line something wrong with the characters:
I have now in my related-posts.php:
$output .= "<div class='$post_class $extra relThumb relThumb".$count." post-format-".$format." related_column'>n";
$output .= " ID)."' class='relThumWrap noLightbox'>n";
$output .= " <span class='related_image_wrap' data-avia-related-tooltip='".$related_post->post_title."'>";
$output .= $image;
$output .= " <span class='related-format-icon avia-font-entypo-fontello {$extra_class}'><span class='related-format-icon-inner'>".$avia_config[$format]."</span></span>";
$output .= " </span>";
$output .= " ";
$output .= " ID)."'>".$related_post->post_title."";
$output .= "</div>";
With the suggested code of the other post, I get an error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/web333/html/netzwerk/site2013/wp-content/themes/enfold/includes/related-posts.php on line 83
line 83 is what here is line 14: http://pastie.org/8059831
Thanks.
Sorry Colorit2,
The right code for the new line should be
$output .= " <br /><a href='".get_permalink($related_post->ID)."'>".$related_post->post_title."</a>";
I think I have done an error copying the code.
Chao!
Ah you made my day, thanks a lot, it works fine now!