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 | |
| add_filter( 'eab-event-post_type-supports', 'adding_excerpt_support' ); | |
| function adding_excerpt_support($supports) { | |
| $supports[] = 'excerpt'; | |
| return $supports; | |
| } |
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 | |
| add_action('admin_init', 'disallowed_theme_page'); | |
| function disallowed_theme_page() { | |
| global $pagenow; | |
| if($pagenow == 'themes.php' && !is_super_admin()){ | |
| wp_redirect(admin_url()); | |
| exit; | |
| } | |
| } |
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
| /********************************** | |
| * | |
| * Move WooCommerce Price on Single Product Page | |
| * | |
| * @author AlphaBlossom / Tony Eppright | |
| * @link http://www.alphablossom.com | |
| * | |
| * Reference hook locations using woocommerce_single_product_summary hook | |
| * | |
| * @hooked woocommerce_template_single_title – 5 |
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 --> | |
| <?php | |
| add_action( 'wp_enqueue_scripts', 'theme_custom_style_script', 11 ); | |
| function theme_custom_style_script() { | |
| wp_enqueue_style( 'dynamic-css', admin_url('admin-ajax.php').'?action=dynamic_css', '', VERSION); | |
| } | |
| add_action('wp_ajax_dynamic_css', 'dynamic_css'); | |
| add_action('wp_ajax_nopriv_dynamic_css', 'dynamic_css'); |
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
| // ACF field added to body class | |
| // Adapted from http://krogsgard.com/2012/wordpress-body-class-post-meta/ | |
| add_filter('body_class','tend_custom_field_body_class'); | |
| function tend_custom_field_body_class( $classes ) { | |
| global $wp_query; | |
| $postid = $wp_query->post->ID; | |
| if ( is_page_template('template-service-index.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
| <?php | |
| /** | |
| * Template Name: Create Post | |
| * | |
| * @author Mike Hemberger | |
| * @link http://thestizmedia.com/front-end-posting-with-acf-pro/ | |
| * @uses Advanced Custom Fields Pro | |
| */ | |
| /** |
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
| function my_post_guidelines() { | |
| $screen = get_current_screen(); | |
| if ( 'post' != $screen->post_type ) | |
| return; | |
| $args = array( | |
| 'id' => 'my_website_guide', | |
| 'title' => 'Content Guidelines', |
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 | |
| /* Pull apart OEmbed video link to get thumbnails out*/ | |
| function get_video_thumbnail_uri( $video_uri ) { | |
| $thumbnail_uri = ''; | |
| // determine the type of video and the video id | |
| $video = parse_video_uri( $video_uri ); | |
| // get youtube thumbnail |
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 | |
| /* | |
| WordPress Theme Template Hierarchy Last updated for WordPress 5.4 | |
| ================================== | |
| This diagram is partially simplified for legibility. To view the complete template hierarchy in use on your site see the | |
| Template panel in the Query Monitor plugin. |
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 | |
| /* | |
| * Loop through Categories and Display Posts within | |
| */ | |
| $post_type = 'features'; | |
| // Get all the taxonomies for this post type | |
| $taxonomies = get_object_taxonomies( array( 'post_type' => $post_type ) ); | |
| foreach( $taxonomies as $taxonomy ) : |