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
// add as much ppeople as you like | |
$people = array('Ana', 'Bobby', 'Charlie', 'Darren', 'Emma'); | |
// Here you can add holidays | |
//$holidays = array('2012-07-12', '2012-07-7'); | |
$holidays = array(''); | |
//set start time once | |
$start = new DateTime('2020-01-06'); |
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
<!-- begin custom related loop, isa --> | |
<?php | |
// get the custom post type's taxonomy terms | |
$custom_taxterms = wp_get_object_terms( $post->ID, 'your_taxonomy', array('fields' => 'ids') ); | |
// arguments | |
$args = array( | |
'post_type' => 'your_custom_post_type', |
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
To fix this, go to MAMP, File > Edit Template > MySQL > [version] and add the line highlighted below. | |
# The MySQL server | |
[mysqld] | |
innodb_force_recovery = 1 | |
The restart the server. After this you can comment out that line. Hopefully you will now be able to run the server again. |
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
'atom-text-editor:not([mini])': 'tab': 'emmet:expand-abbreviation-with-tab' |
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 | |
$taxonomy = 'type'; | |
$terms = get_terms($taxonomy,array( | |
'orderby' => 'name', | |
'order' => 'ASC', | |
'hide_empty' => true | |
)); ?> | |
<section id="featured"> | |
<div class="container"> | |
<div class="row"> |
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 | |
$loop = new WP_Query(array( | |
'post_type' => 'ad', | |
'posts_per_page' => 4, | |
'tax_query' => array( | |
// Note: tax_query expects an array of arrays! | |
array( | |
'taxonomy' => 'type', // my guess | |
'field' => 'slug', | |
'terms' => 'business', |
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('FS_METHOD', 'direct'); |
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
//add this in the functions.php | |
function my_acf_google_map_api( $api ){ | |
$api['key'] = 'xxx'; | |
return $api; | |
} | |
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api'); |
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
/** | |
* Include the TGM_Plugin_Activation class. | |
*/ | |
require_once dirname( __FILE__ ) . '/../class-tgm-plugin-activation.php'; | |
add_action( 'tgmpa_register', 'my_theme_register_required_plugins' ); | |
/** | |
* Register the required plugins for this theme. | |
* | |
* In this example, we register two plugins - one included with the TGMPA library |
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
add_action( 'get_header', 'remove_page_title' ); | |
function remove_page_title() { | |
if ( is_page( 3 ) ) { | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
} | |
} |