llt-snippets README
PHP, HTML, JS, SCSS, ACF, and WordPress Snippets used by LLT-Group.
PHP
Snippet
gtp
get_template_part("parts/folder");
year
echo date('Y');
_
_log( );
##HTML
Snippet
gtp
<?php get_template_part("parts/folder"); ?>
year
<?php echo date('Y'); ?>
_
<?php _log( ); ?>
var
<?php
$var
?>
elseif
<?php elseif (condition): ?>`
start
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>Title</title>
</head>
<body>
</body>
</html>
##JAVASCRIPT
Snippet
start
jQuery(document).ready(function($){
});
plugin
(function($){
})(jQuery);
_
console.log( );
if
if( rule ){
statement
}
exists
if ($('SELECTOR')[0]){
function
}
##SCSS
Snippet
bpmix
@include breakpoint(desktop){
}
transition
-webkit-transition: all 0.35s ease-in-out;
-moz-transition: all 0.35s ease-in-out;
-o-transition: all 0.35s ease-in-out;
transition: all 0.35s ease-in-out;
transform
-webkit-transform: effect;
-moz-transform: effect;
-o-transform: effect;
transform: effect;
##ACF
Snippet
gf
<?php get_field( '' ); ?>
tf
<?php the_field( '' ); ?>
gsf
<?php get_sub_field( '' ); ?>
tsf
<?php the_sub_field( '' ); ?>
gfo
<?php get_field( '', 'option' ); ?>
tfo
<?php the_field( '', 'option' ); ?>
gft
<?php get_field( '', 'taxonomy_slug_' . term_id ); ?>
tft
<?php the_field( '', 'taxonomy_slug_' . term_id ); ?>
repeater
<?php if( have_rows( 'repeater_name' ) ): ?>
<?php while ( have_rows( 'repeater_name' ) ) : the_row(); ?>
<?php endwhile; ?>
<?php endif; ?>
flex
<?php if( have_rows( 'page_builder' ) ) : ?>
<?php while ( have_rows( 'page_builder' ) ) : the_row(); ?>
<?php
$layout = str_replace("_", "-", get_row_layout());
get_template_part('parts/page-builder/'.$layout);
?>
<?php endwhile; ?>
<?php endif; ?>
##WordPress
Snippet
template
<?php /* Template Name: Template Name */ ?>
<?php get_header(); ?>
<?php get_footer(); ?>
start
<?php get_header(); ?>
<?php get_footer(); ?>
header
<?php get_header(); ?>
footer
<?php get_footer(); ?>