<?php
// prefix + ID
$images = rwmb_meta( 'your_prefix_imgadv', 'size=full' );
if ( !empty( $images ) ) {
foreach ( $images as $image ) {
// set sizes var
$sizes = wp_calculate_image_sizes( array( $image['width'], $image['height'] ), null, null, $image['ID'] );
// display link to full image and image with srcset and sizes attributes
echo "\n<a href="{$image[" full_url="">\n<img src="{$image[" url="" width="{$image[" height="{$image[" alt="{$image[" srcset="{$image[" sizes="{$sizes}">\n</a>";
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 | |
// Force removal of styles | |
add_filter('print_styles_array', 'custom_print_styles_array'); | |
/** | |
* Force removal of styles that are not enqued properly | |
*/ | |
function custom_print_styles_array($styles){ | |
$styles_to_remove = array( | |
'mailpoet_public', // plugins/mailpoet | |
'mailpoet_custom_fonts_css' // plugins/mailpoet |
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
$accents: ( | |
primary: --color-big-sky-500, | |
spotlight: --color-aruba-500, | |
warning: --color-yellow-500, | |
danger: --color-cardinal-500, | |
info: --color-scarlet-500 | |
); | |
.card-accent { |
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
.vv-wizard-stepper { | |
display: flex; | |
justify-content: center; | |
margin: 20px 0; | |
} | |
.vv-wizard-stepper ul { | |
display: flex; | |
margin: 0; | |
padding: 0; | |
} |
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
.vv-wizard-stepper { | |
display: flex; | |
justify-content: center; | |
margin: 20px 0; | |
} | |
.vv-wizard-stepper ul { | |
display: flex; | |
margin: 0; | |
padding: 0; | |
} |
This is a small guide as a self-reminder :)
Install NodeJs
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
var el = document.querySelector('.button'); | |
function setAttributes(el, attrs) { | |
Object.keys(attrs).forEach(key => el.setAttribute(key, attrs[key])); | |
} | |
setAttributes(el, { | |
class: 'button button--lg button--inverted', | |
'data-src': 'https://player.vimeo.com/video/28629415?autoplay=false', | |
'data-padding-bottom': '56.25%', |
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
prompt_context() { | |
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then | |
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER" | |
fi | |
} |
<?php
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$args = array(
'post_type' => 'press_article',
'showposts' => '1',
'paged' => $paged,
);
// Enable shortcodes in widgets
add_filter('widget_text', 'do_shortcode');
NewerOlder