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 | |
$query = new WP_Query(); | |
$query->query(array( | |
'post_type' => 'service', | |
'posts_per_page' => -1 | |
)); | |
$post_count = $query->post_count; | |
$count = 1; | |
?> |
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 | |
// check if the repeater field has rows of data | |
if( have_rows('repeater_field_name') ): | |
// loop through the rows of data | |
while ( have_rows('repeater_field_name') ) : the_row(); | |
// display a sub field value | |
the_sub_field('sub_field_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
<div class="row"> | |
<div class="large-12 columns"> | |
</div> | |
</div> |
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
.overlay:before{ | |
position: absolute; | |
content:""; | |
top:0; | |
left:0; | |
width:100%; | |
height:100%; | |
display: none; | |
z-index: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
<?php bloginfo('stylesheet_directory'); ?> |
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 | |
function grav_get_svg($svg){ | |
$path = get_stylesheet_directory().'/library/images/svgs/'.$svg; | |
if(file_exists($path)){ | |
return file_get_contents($path); | |
} return ''; | |
} |
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
@media only screen and (min-width: 768px), | |
screen and (width:768px) and (resolution: 163dpi) { | |
} | |
@media only screen and (min-width: 960px) { | |
} |
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 | |
add_action( 'admin_enqueue_scripts', 'load_admin_custom_script' ); | |
function load_admin_custom_script() { | |
$current_screen = get_current_screen(); | |
if ( $current_screen->post_type === 'custom_post_type_name' ) { | |
$ss_url = get_bloginfo('stylesheet_directory'); | |
wp_enqueue_script('jquery'); |
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 | |
$file = dirname(__FILE__) . '/your-main-plugin-file.php'; | |
$plugin_url = plugin_dir_url($file); | |
$plugin_path = plugin_dir_path($file); |
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
##Use cli aliases. | |
I love git’s cli and prefer to use it most of times while performing active operations (commit, push, checkout etc.). There is a chance that you’ll get tired of typing the same command on and on and that’s when you find your life-saver represented by git aliases. | |
$ git config --global alias.co "checkout" | |
$ git config --global alias.cmm "commit -m" | |
$ git config --global alias.rh "reset HEAD" | |
$ git config --global alias.rhh "reset HEAD --hard"' |