CSSでスクロールバーを装飾する

.scroll {
    overflow: auto;

    &::-webkit-scrollbar {
        width: 3px;
    }

    &::-webkit-scrollbar-track {
        background-color: #f0f0f0;
    }

    &::-webkit-scrollbar-thumb {
        background-color: #999;
        border-radius: 0;
    }
}

WordPressの先頭に固定表示が効かない

WP_Queryでカテゴリ絞り込みを使うと効かない模様

以下のように「’ignore_sticky_posts’ => false」を付けるとうまくいきます。

$args = array(
    'post_type'      => 'post', // 投稿タイプ
    'posts_per_page' => 10,     // 表示件数
    'ignore_sticky_posts' => false, // 先頭固定表示を有効にする
);
$the_query = new WP_Query( $args );

if ( $the_query->have_posts() ) {
    while ( $the_query->have_posts() ) {
        $the_query->the_post();
        ?>
<---  記事の表示 -->
        <?php
    }
    wp_reset_postdata();
} else {
    // 記事が見つからない場合の処理
}