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
@mixin defineCols($numPerRow, $margin) { | |
width: ((100% - (($numPerRow - 1) * $margin)) / $numPerRow); | |
&:nth-child(n) { | |
margin-bottom: $margin; | |
margin-right: $margin; | |
} | |
&:nth-child(#{$numPerRow}n) { | |
margin-right: 0; | |
margin-bottom: 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
var Helloworld = React.createClass({ | |
render: function() { | |
return ( | |
<div>Hello Wold</div> | |
); | |
} | |
}); | |
ReactDOM.render(<Helloworld />, document.body); |
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 | |
$args = array( | |
// arguments for your query | |
'post_type' => '', | |
'posts_per_page'=> -1, | |
'orderby' => 'meta_value_num', | |
'order' => 'ASC' | |
); | |
// the query | |
$the_query = new WP_Query( $args ); ?> |
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
function wp_api_encode_acf($data,$post,$context){ | |
$data['meta'] = array_merge($data['meta'],get_fields($post['ID'])); | |
return $data; | |
} | |
if( function_exists('get_fields') ){ | |
add_filter('json_prepare_post', 'wp_api_encode_acf', 10, 3); | |
} |
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
(function($,window){ | |
window.getActiveMQ = function() | |
{ | |
$('<div id="getActiveMQ-watcher"></div>') | |
.appendTo('body') | |
.hide(); | |
var computed = window.getComputedStyle, | |
watcher = document.getElementById('getActiveMQ-watcher'); |
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
/* Mobile first queries */ | |
/* Larger than mobile */ | |
@media (min-width: 400px) {} | |
/* Larger than phablet */ | |
@media (min-width: 550px) {} | |
/* Larger than tablet */ | |
@media (min-width: 750px) {} |
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 echo get_stylesheet_directory_uri(); ?> |
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('url'); ?> |
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
// example 'news' cpt | |
function myquery_custom_post_rewrite( $rewrite_rules ) { | |
$pagination_base = $GLOBALS['wp_rewrite']->pagination_base; | |
$myqueryslug = 'news'; | |
$year_archive = array( | |
$myqueryslug . '/([0-9]{4})/' . $pagination_base . '/?([0-9]{1,})/?$' => 'index.php?post_type=' . $myqueryslug . '&year=$matches[1]&paged=$matches[2]', | |
$myqueryslug . '/([0-9]{4})/?$' => 'index.php?post_type=' . $myqueryslug . '&year=$matches[1]', | |
); | |
$rewrite_rules = $year_archive + $rewrite_rules; |
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
define('DISALLOW_FILE_EDIT', true); | |
/* That's all, stop editing! Happy blogging. */ |
NewerOlder