This file contains hidden or 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
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
This file contains hidden or 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
//Get the Custom Post Type | |
// -1 means we get all the posts type. | |
<?php | |
$things = get_posts(['post_type' => 'CPT','posts_per_page' => -1]); | |
//Start with 0 calories | |
$total = 0; | |
//Then Loop through all the posts in your CPT | |
Foreach($LotsofPosts as $singlePost): | |
//well grab the calories from each post |
This file contains hidden or 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
/*Put this in the header*/ | |
html{visibility: hidden;opacity:0;} | |
/*Put this in the footer*/ | |
html { | |
visibility: visible; | |
opacity: 1; | |
} |
This file contains hidden or 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 Custom Code - plugins loaded | |
if ( function_exists( 'acf_add_options_page' ) ) { | |
acf_add_options_page(); | |
} | |
function tct_field($field_name) { | |
return get_field( $field_name, 'option' ); | |
} |
This file contains hidden or 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
::-webkit-scrollbar { | |
width: 8px; | |
} | |
::-webkit-scrollbar-button { | |
width: 8px; | |
height: 5px; | |
} | |
::-webkit-scrollbar-track { | |
background: #eee; | |
border: thin solid lightgray; |
This file contains hidden or 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
/*------------------------------------------ | |
Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
1280-1024 - desktop (default grid) | |
1024-768 - tablet landscape | |
768-480 - tablet | |
480-less - phone landscape & smaller | |
--------------------------------------------*/ | |
@media all and (min-width: 1024px) and (max-width: 1280px) { } | |
@media all and (min-width: 768px) and (max-width: 1024px) { } |
This file contains hidden or 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
document.addEventListener("DOMContentLoaded", function () { | |
jQuery(function ($) { | |
$(document).scroll(function () { | |
if ($("#header").hasClass("elementor-sticky--effects")) { | |
// active | |
console.log("active"); | |
$("#header").animate({ | |
"left": 0, | |
"width": "100%", | |
"justify-content": "center" |