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
| if ( ! function_exists( 'mytheme_entry_image' ) ) : | |
| /** | |
| * Display an optional entry thumbnail. | |
| */ | |
| function mytheme_entry_image() { | |
| if ( ! has_post_thumbnail() ) { | |
| return; | |
| } | |
| $featured_image = get_post_thumbnail_id(); | |
| $attachment_page = esc_url( get_attachment_link( $featured_image ) ); |
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
| $latest_posts = new WP_Query( array( | |
| 'posts_per_page'=>3, | |
| 'ignore_sticky_posts' => true | |
| ) | |
| ); | |
| if ( $latest_posts->have_posts()) : ?> | |
| <ul class="latest-posts clear"> | |
| <?php while($latest_posts->have_posts()) : $latest_posts->the_post(); ?> | |
| <li id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
| <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> |
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 | |
| /** | |
| * Initialize Custom Metabox class. | |
| * https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress | |
| * https://github.com/mustardBees/cmb_field_map | |
| */ | |
| function sendtheme_initialize_metaboxes() { | |
| if ( !class_exists( 'cmb_Meta_Box' ) ) { | |
| require_once get_template_directory() . '/metaboxes-1.2.0/init.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 | |
| // Add social media text inputs. | |
| $social_media_array = array( | |
| __( 'Facebook', 'twentyfourteen' ) => 'facebook', | |
| __( 'Flickr', 'twentyfourteen' ) => 'flickr', | |
| __( 'Google+', 'twentyfourteen' ) => 'googleplus', | |
| __( 'Instagram', 'twentyfourteen' ) => 'instagram', | |
| __( 'LinkedIn', 'twentyfourteen' ) => 'linkedin', | |
| __( 'Pinterest', 'twentyfourteen' ) => 'pinterest', | |
| __( 'Skype', 'twentyfourteen' ) => 'skype', |
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
| var infowindow = new google.maps.InfoWindow({ | |
| map: map, | |
| position: pos, | |
| content: '<?php echo get_the_title(); ?>' | |
| }); |
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 // Map page | |
| if ( get_theme_mod( 'map_page' ) ) { | |
| $map_page_id = get_theme_mod( 'map_page' ); ?> | |
| <div class="location-map"> | |
| <a href="<?php echo esc_url( get_permalink( $map_page_id ) ); ?>" title="<?php echo esc_attr( get_the_title( $map_page_id ) ); ?>"> | |
| <?php echo esc_attr( get_the_title( $map_page_id ) ); ?> | |
| </a> | |
| </div><?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 | |
| $wp_customize->add_setting( 'select_page', array( | |
| 'default' => '', | |
| ) ); | |
| $wp_customize->add_control( 'map_page_control', array( | |
| 'label' => __( 'Select page', 'twentyfourteen' ), | |
| 'section' => 'theme_options', | |
| 'settings' => 'select_page', |
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 | |
| // Slider autoplay toggle. | |
| $wp_customize->add_setting( 'slider_autoplay', array( | |
| 'default' => 'disabled', | |
| 'sanitize_callback' => 'twentyfourteen_sanitize_slider_autoplay', | |
| ) ); | |
| $wp_customize->add_control( 'slider_autoplay', array( | |
| 'label' => __( 'Slider Autoplay', 'twentyfourteen' ), | |
| 'section' => 'featured_content', |
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
| <script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
| <script type="text/javascript"> | |
| google.load("visualization", "1", {packages:["map"]}); | |
| google.setOnLoadCallback(drawChart); | |
| function drawChart() { | |
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 a home link to wp_page_menu() by default | |
| */ | |
| function twentyfourteen_page_menu_args( $args ) { | |
| $show_on_front = get_option('show_on_front'); | |
| if ( $show_on_front == 'posts' ) { | |
| $args['show_home'] = true; | |
| } | |
| return $args; |