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 | |
/** | |
* Custom site logo function. | |
* | |
* Check if a site logo has been uploaded. If a site logo is present, query the database to retrieve | |
* the medium sized version of the image. This function prevents excessively large logo images being | |
* displayed on the frontend. | |
*/ | |
function twentyfourteen_site_logo() { | |
$site_logo = get_theme_mod( 'site_logo' ); |
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 | |
/** Remember to remove the below featuredslider (note custom name) js stuff in functions.js file | |
* | |
_window.load( function() { | |
if ( body.is( '.slider' ) ) { | |
$( '.featured-content' ).featuredslider( { | |
selector: '.featured-content-inner > article', | |
controlsContainer: '.featured-content' | |
} ); |
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 | |
/* | |
* http://www.wpbeginner.com/wp-tutorials/how-to-disable-comments-on-wordpress-media-attachments/ | |
*/ | |
function filter_media_comment_status( $open, $post_id ) { | |
$post = get_post( $post_id ); | |
if( $post->post_type == 'attachment' ) { | |
return false; | |
} | |
return $open; |
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 | |
/** | |
* 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; |
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
<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 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 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 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 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 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', |
OlderNewer