Skip to content

Instantly share code, notes, and snippets.

View orenshim's full-sized avatar

Oren Shimon orenshim

View GitHub Profile
add_image_size( 'content', '800', '9999', false );
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'content' => __( 'Content' ),
) );
}
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
/* CSS for GeneratePress SVG logo size */ .header-image { width: 310px; }
<?php if ( is_single() ) : ?>
[elementor-template id="556"]
<?php endif; ?>
<?php if ( is_page(22) ) : ?>
[elementor-template id="556"]
<?php endif; ?>
<?php if ( is_front_page() ) : ?>
This content will only show on the static front page
<?php endif; ?>
add_filter( 'generate_number_of_fonts','tu_show_all_available_google_fonts' );
function tu_show_all_available_google_fonts() {
return 'all';
}
@media (min-width:768px) and (max-width:950px) {
selector .elementor-row {
flex-wrap:wrap;
}
selector .elementor-colum {
width: 50%;
}
}
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'content' => __( 'Content' ),
) );
}
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
@orenshim
orenshim / gist:900cbad097580846bf1c2e88ea2076cd
Last active February 19, 2019 08:50
Automatically set Elementor pages full width
add_action( 'template_redirect','tu_add_elementor_filter', 999 );
function tu_add_elementor_filter() {
if ( in_array( 'elementor-page elementor-page-' . get_the_ID(), get_body_class() ) ) {
add_filter( 'body_class', 'tu_add_elementor_classes' );
add_filter( 'generate_show_title','__return_false' );
}
}
function tu_add_elementor_classes( $classes ) {
$classes[] = 'full-width-content';