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 | |
| function sw_setup() { | |
| if(get_option('page_on_front')=='0' && get_option('show_on_front')=='posts') { | |
| // Create homepage | |
| $homepage = array( | |
| 'post_type' => 'page', | |
| 'post_title' => 'Home', | |
| 'post_content' => '', | |
| 'post_status' => 'publish', | |
| 'post_author' => 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 | |
| // Set the Default Theme for WordPress Multisite | |
| define( 'WP_DEFAULT_THEME', 'plant' ); |
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 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 | |
| // Ref: https://guides.wp-bullet.com/how-to-use-mailgun-with-wordpress-multisite-http-api-or-smtp/ | |
| //Mailgun multisite stuff | |
| define('MAILGUN_USEAPI', true); | |
| define('MAILGUN_APIKEY', 'key-YourAPIKeyHere'); | |
| define('MAILGUN_DOMAIN', 'mg.youdomain.com' ); | |
| define('MAILGUN_SECURE', true); | |
| // Set the from name and from address |
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 $user = wp_get_current_user();?> | |
| <h3 class="name"><?php echo $user->first_name . ' ' . $user->last_name;?></h3> | |
| <div class="profile"> | |
| <div class="contact"> | |
| <p><?php echo $user->user_email; ?></p> | |
| <p><?php echo $user->billing_phone; ?></p> | |
| </div> | |
| <div class="address"> | |
| <p> | |
| <?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
| /* Add Category Name to body_class */ | |
| add_filter('body_class','moss_add_category_to_single'); | |
| function moss_add_category_to_single($classes) { | |
| if (is_single() ) { | |
| global $post; | |
| foreach((get_the_category($post->ID)) as $category) { | |
| $classes[] = 'category-' . $category->category_nicename; | |
| } | |
| } |
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 | |
| /** | |
| * ACF Repeater Field : headlines | |
| * ACF Sub Field: headline (Post ID) | |
| */ | |
| $posts = array(); | |
| if (have_rows('headlines')) { | |
| while (have_rows('headlines')) { | |
| the_row(); |
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
| $line: #dcdfe5; | |
| $primary: #339833; | |
| $primary-active: #1c6808; | |
| $gray: #878f9d; | |
| div.acf-fields { | |
| > .acf-field { | |
| padding: 15px 16px; | |
| @media (min-width: 768px) { | |
| padding: 20px 30px; |
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 | |
| /** | |
| * Use ACF image field as avatar | |
| * @author Mike Hemberger | |
| * @link http://thestizmedia.com/acf-pro-simple-local-avatars/ | |
| * @uses ACF Pro image field (tested return value set as Array ) | |
| */ | |
| add_filter('get_avatar', 'acf_profile_avatar', 10, 5); | |
| function acf_profile_avatar( $avatar, $id_or_email, $size, $default, $alt ) { | |
| if ( is_numeric( $id_or_email ) ) { |