doudiemei2013 2019-08-09 03:24
浏览 46

如何在不显示其他块的情况下突出显示帖子? - Wordpress?

Guys I'm creating a theme for a Wordpress news site and I'm not finding a way to publish a featured news story without it appearing in other blocks. - I was using tags, but I want to put it to appear in the post and I don't want the tag => 'highlights' to appear, just as if I create a category. I want to type an offset in the other block (other than the highlight) that shows what was already highlighted, but not what is currently ...

<?php
    global $post;
    $c = 0;
    $args = array( 'numberposts' => 1, 'tag' => 'destaques');
    $myposts = get_posts( $args );
    foreach( $myposts as $post ) : setup_postdata($post); ?>

        <div class="col-md-4 container-large <?php $c++; if($c == 2) { echo 'no-no'; } ?>" id="containerMancheteEsq">
            <div class="container-esq-feed <?php $c++; if($c == 6) { echo 'no-no'; } ?>">
                <a href="<?php the_permalink(); ?>">
                <div class="container-imagem">
                    <?php the_post_thumbnail('medium', array('class' => 'containerManchete-img')); ?>
                </div>
            </a>
                <div class="container-info-simple">
                    <span class="target"><?php the_category(); ?></span>
                    <a href="<?php the_permalink(); ?>">
                    <h4><?php the_title(); ?></h4>
                    </a>

                </div>
            </div>


        </div>

    <?php endforeach; ?>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 yolov8边框坐标
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂