css JetPack相关文章

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css JetPack相关文章相关的知识,希望对你有一定的参考价值。

<?php //<~ don't add me in, but add the rest to functions.php

function jetpackme_more_related_posts( $options ) {
    $options['size'] = 6; //change the number for the amount required
    return $options;
}
add_filter( 'jetpack_relatedposts_filter_options', 'jetpackme_more_related_posts' );
<?php //<~ don't add me in, but add the rest to functions.php

//Change Related Post HEadline
function jetpackme_related_posts_headline( $headline ) {
$headline = sprintf(
            '<h3 class="jp-relatedposts-headline"><strong>%s</strong></h3>',
            esc_html( 'Similar Stuff Going On' )//change your headline here
            );
return $headline;
}
add_filter( 'jetpack_relatedposts_filter_headline', 'jetpackme_related_posts_headline' );
/* You may need to add the !important declaration if your JetPacks CSS loads last  - this works for a 6 up layout */

div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(3n+1), div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post:nth-child(3n+1) {
    clear: left;
}


@media only screen and (max-width: 640px) {
	
	div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(3n+1), div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post:nth-child(3n+1) {
	    clear: none;
	}
	div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(3n) {
	    clear: none;
	}
	div#jp-relatedposts div.jp-relatedposts-items .jp-relatedposts-post:nth-child(2n+1) {
	    clear: left;
	}

}

以上是关于css JetPack相关文章的主要内容,如果未能解决你的问题,请参考以下文章

css JetPack相关文章

Jetpack 由 WordPress.com 出品

php 删除Jetpack css

Jetpack Compose - animateXxxAsState

4. Jetpack源码解析—LiveData的使用及工作原理

4. Jetpack源码解析—LiveData的使用及工作原理