Salam.
Mən
bu saytda Xəbər Lenti hissəsinə düzəliş edirəm.
Orada xəbər başlıqları gedir, onun sağ hissəsinə xəbərin şəklini
[code]<?php the_post_thumbnail( 'thumbnail' ); ?>[/code]
ilə əlavə eləmək istəyirəm, əlavə olunur. Sadəcə problem ondadır ki, ikisi də müxtəlif sətirlərdə hərəkət edir (bunu şəkilin ölçüsünü azaltmaqla gördüm) Yəni yuxarıda olan nə qədər böyük ölçüdədirsə, aşağıdakı o qədər itir.
"Xəbər lenti hissəsini təqdim edirəm:
[code]<?php
/**
* The template for displaying the scrolling posts.
* Gets the category for the posts from the theme options.
* If no category is selected, displays the latest posts.
*
* @package WordPress
* @file ticker.php
* @author Wellthemes
* @link http://wellthemes.com
*/
?>
<div class="ticker-section">
<script>
jQuery(document).ready(function($) {
$(".ticker").show();
$(function() {
$("#ticker-posts").simplyScroll();
});
});
</script>
<div class="inner-wrap">
<div class="ticker">
<div class="title">
<i class="fa fa-angle-right"></i>
<?php printf(__( '%sXəbər%s lenti', 'wellthemes' ), '<span class="main-color">', '</span>' ); ?>
</div>
<ul id="ticker-posts">
<?php
$cat_id = wt_get_option('wt_ticker_cat');
$args = array(
'cat' => $cat_id,
'post_status' => 'publish',
'ignore_sticky_posts' => 1,
'posts_per_page' => 10
);
?>
<?php $query = new WP_Query( $args ); ?>
<?php if ( $query -> have_posts() ) : ?>
<?php while ( $query -> have_posts() ) : $query -> the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></li>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query();?>
</ul>
</div>
</div>
</div><!-- /ticker-section -->[/code]
"
Burada
[code]<?php the_post_thumbnail( 'thumbnail' ); ?>[/code]
əlavə eləsək, belə olar:
[code]<li> <a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_post_thumbnail( 'thumbnail' ); the_title(); ?></a></li>[/code]
Skrinşotda görünür ki, ikisi də müxtəlif sətirlərdədir. Birinci thumbnail kiçikdir, çünki ölçüsünü kiçik ayarlamışam. İkinci isə böyük, və onun ölçüsü başlığın itməsinə gətirib çıxardır.
https://postimg.org/image/8mqp1mmlt/
Bir çox kod və atributları yoxlamışam, lakin heç nə dəyişməyib.