Instantly share code, notes, and snippets.

View gist:1332e26a691734d672be3e9aa5bfbcca
line-height: 25px; /* within paragraph */
margin-bottom: 20px; /* between paragraphs */
}
View Add new image size to WordPress Media 'Size' dropdown
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'content' => __( 'Content' ),
) );
}
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
View Responsive Column Layouts in Elementor
@media (min-width:768px) and (max-width:950px) {
selector .elementor-row {
flex-wrap:wrap;
}
selector .elementor-colum {
width: 50%;
}
}
View Add More Google Fonts for GP
add_filter( 'generate_number_of_fonts','tu_show_all_available_google_fonts' );
function tu_show_all_available_google_fonts() {
return 'all';
}
View hook for homepage
<?php if ( is_front_page() ) : ?>
This content will only show on the static front page
<?php endif; ?>
View hook for page
<?php if ( is_page(22) ) : ?>
[elementor-template id="556"]
<?php endif; ?>
View Hook for Posts
<?php if ( is_single() ) : ?>
[elementor-template id="556"]
<?php endif; ?>
View CSS for SVG
/* CSS for GeneratePress SVG logo size */ .header-image { width: 310px; }
View Add Image Size dropdown
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'content' => __( 'Content' ),
) );
}
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
View Add Image Size
add_image_size( 'content', '800', '9999', false );