我的相關帖子圖片無法正常顯示!我希望圖像完全正常地顯示出來!
我的相關帖子示例頁面:https://softcroco.com/adobe-photoshop-7-0/
我希望我的相關職位圖像和標題像下面的截圖之一:
我的代碼:
<?php
// Related Posts.
if ( '1' === $schema_lite_relatedposts_section && empty( $disable_related_posts ) ) {
$categories = get_the_category( $post->ID );
if ( $categories ) {
$category_ids = array();
foreach ( $categories as $individual_category ) {
$category_ids[] = $individual_category->term_id;
}
$args = array(
'category__in' => $category_ids,
'post__not_in' => array( $post->ID ),
'ignore_sticky_posts' => 1,
'showposts' => 6,
'orderby' => 'rand',
);
$my_query = new wp_query( $args );
if ( $my_query->have_posts() ) {
echo '<div class="related-posts"><div class="postauthor-top"><h3>' . __('Related Downloads:', 'schema-lite') . '</h3></div>';
$j = 0;
while ( $my_query->have_posts() ) {
$my_query->the_post();
?>
<article class="post excerpt <?php echo ( ++$j % 3 == 0 ) ? 'last' : ''; ?>">
<?php if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" id="relatedfeatured-thumbnail">
'' ) ); ?>
.related-posts article header { margin-bottom: -30px; }.related-posts .post.excerpt{margin-bottom: -85px;}.relatedfeatured-thumbnail img { width: 35px; height: 35px; margin-bottom: 0; }.relatedfeatured-thumbnail { float: left; margin-bottom: 8px; margin-left: 8px; margin-top: 25px; }
我試圖在CSS中改變,但什么也沒發生。
上一篇vue中 內容分發