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 | |
| /* | |
| Valet driver for Wordpress Multisite | |
| Usage: Drop this file into your ~/.valet/Drivers/ directory | |
| */ | |
| class WordPressMultisiteValetDriver extends WordPressValetDriver | |
| { |
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 | |
| echo '<pre>'; | |
| print_r($VAR); | |
| echo '</pre>'; | |
| die; | |
| ?> | |
| <?php echo '<pre>'; print_r($VAR); echo '</pre>'; ?> |
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
| // functions.php | |
| wp_enqueue_style( 'print-style', get_stylesheet_directory_uri() . '/style-print.css', false, '1.0.0', 'print' ); |
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 | |
| /** | |
| * Page Slug Body Class | |
| */ | |
| function add_slug_body_class( $classes ) { | |
| global $post; | |
| if (isset($post)) { | |
| $classes[] = $post->post_type . '-' . $post->post_name; | |
| } |
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
| $taxonomy = 'concerts'; | |
| $queried_term = get_query_var($taxonomy); | |
| $terms = get_terms($taxonomy, 'slug='.$queried_term); | |
| if ($terms) { | |
| echo '<ul>'; | |
| foreach($terms as $term) { | |
| echo '<li><a href="'.get_term_link($term->slug, $taxonomy).'">'.$term->name.'</a></li>'; | |
| } | |
| echo '</ul>'; | |
| } |
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 | |
| $field_key = "field_582cd061fb8e4"; | |
| $field = get_field_object($field_key); | |
| if( $field ) { | |
| echo '<select name="' . $field['key'] . '">'; | |
| foreach( $field['choices'] as $k => $v ) { | |
| echo '<option value="' . $k . '">' . $v . '</option>'; | |
| } | |
| echo '</select>'; |
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 | |
| define('WP_DEBUG', true); | |
| define('WP_DEBUG_DISPLAY', true); | |
| define('SAVEQUERIES', true); // additional DB debug details | |
| defined('DISALLOW_FILE_MODS') || define('DISALLOW_FILE_MODS',true); // Disable updates view | |
| define('DB_NAME', ''); | |
| define('DB_USER', ''); |
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 echo do_shortcode("[shortcode]"); ?> |
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 | |
| /** | |
| * https://codex.wordpress.org/Conditional_Tags#The_Blog_Page | |
| * There is no conditional tag for the blog list page. You have to use | |
| * both `is_home()` and `is_front_page()` to detect this page. You also | |
| * have to use them in the right order to avoid bugs and to test every | |
| * user configuration. | |
| */ | |
| if (is_front_page() && is_home()) { |