This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set_posts_per_page_for_towns_cpt( $query ) { | |
if ( !is_admin() && $query->is_main_query() && is_post_type_archive( 'szkoa' ) ) { | |
$query->set( 'posts_per_page', '12' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'set_posts_per_page_for_towns_cpt' ); | |
// set posts per page for custom post type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$category = get_the_category(); | |
echo $category[0]->category_description; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parent { | |
font-size: 0; | |
} | |
/* remove atribute from parent */ | |
children { | |
font-size: 10px; | |
} | |
/* reinitialize atribute on children level */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $count_posts = 0; | |
$q = new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => 4 ) ); | |
if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post(); | |
$count_posts = $count_posts+1; | |
$obraz_wyrozniajacy = get_field('obraz_wyrozniajacy'); | |
$size_1 = 'thumbnail'; | |
$size_2 = 'medium'; | |
$size_3 = 'large'; | |
$size_4 = 'full'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $category = get_the_category();echo $category[0]->cat_name; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo get_permalink( pll_get_post( postID ) ); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function new_excerpt_length($length) { | |
return 20; | |
} | |
add_filter('excerpt_length', 'new_excerpt_length'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $q = new WP_Query( array( 'post_type' => 'page', 'post_parent' => 97, 'depth' => 1 ) ); | |
if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post(); | |
?> | |
<?php endwhile; endif;?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.absolute-center { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
-webkit-transform: translate(-50%, -50%); | |
-ms-transform: translate(-50%, -50%); | |
transform: translate(-50%, -50%); | |
} |
OlderNewer