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
function wpex_post_featured_image() { | |
global $post; | |
if ( !has_post_thumbnail( $post->ID ) ) return; | |
if ( !get_theme_mod( 'wpex_blog_post_thumb', '1' ) ) return; | |
if ( 'on' == get_post_meta( $post->ID, 'wpex_disable_featured_image', true ) ) return; ?> | |
<div class="post-thumbnail"> | |
<a href="<?php echo wp_get_attachment_url(get_post_thumbnail_id()); ?>" title="View Full Image"><img src="<?php echo wpex_get_featured_img_url(); ?>" alt="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>" /></a> | |
</div><!-- .post-thumbnail --> | |
<?php | |
} // End function |
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
function my_attachments_search( $query ) { | |
if ( !is_search() ) | |
return $query; | |
$post_types = $query->get( 'post_type' ); | |
if ( ! $post_types || 'post' == $post_types ) | |
$post_types = array( 'post', 'attachment' ); | |
if ( is_array( $post_types ) ) | |
$post_types[] = 'attachment'; |
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
if ( ! function_exists( 'wpex_sidebar_display' ) ) { | |
function wpex_sidebar_display() { | |
if ( is_front_page() ) return true; // Display sidebar on homepage no matter what. | |
if ( is_singular() ) { | |
global $post; | |
$post_layout = get_post_meta( $post->ID, 'wpex_post_layout', true ); | |
if ( '' == $post_layout ) return true; | |
if ( 'right-sidebar' == $post_layout || 'left-sidebar' == $post_layout ) { | |
return true; |
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
get_post_meta( get_post_thumbnail_id( get_the_ID() ), '_wp_attachment_image_alt', true); |
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
//Remove the slug from portfolio post type | |
function vipx_remove_cpt_slug( $post_link, $post, $leavename ) { | |
if ( ! in_array( $post->post_type, array( 'portfolio' ) ) || 'publish' != $post->post_status ) | |
return $post_link; | |
$post_link = str_replace( '/'. wpex_option('portfolio_slug','portfolio-item') .'/', '/', $post_link ); | |
return $post_link; | |
} | |
add_filter( 'post_type_link', 'vipx_remove_cpt_slug', 10, 3 ); | |
function vipx_parse_request_tricksy( $query ) { | |
// Only noop the main query |
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
<FilesMatch ".(ttf|otf|eot|woff)$"> | |
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin "*" | |
</IfModule> | |
</FilesMatch> |
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
function add_video_wmode_transparent($html, $url, $attr) { | |
if ( strpos( $html, "<embed src=" ) !== false ) | |
{ return str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque" ', $html); } | |
elseif ( strpos ( $html, 'feature=oembed' ) !== false ) | |
{ return str_replace( 'feature=oembed', 'feature=oembed&wmode=opaque', $html ); } | |
else | |
{ return $html; } | |
} | |
add_filter( 'embed_oembed_html', 'add_video_wmode_transparent', 10, 3); |
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
function remove_ultra_responsive_css() { | |
wp_dequeue_style( 'wpex-responsive' ); | |
} | |
add_action( 'wp_print_styles', 'remove_ultra_responsive_css' ); |
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
if ( ! function_exists( 'wpex_embed_oembed_html' ) ) { | |
function wpex_embed_oembed_html($html, $url, $attr, $post_id) { | |
return '<div class="responsive-video-wrap entry-video">' . $html . '</div>'; | |
} | |
} | |
add_filter('embed_oembed_html', 'wpex_embed_oembed_html', 99, 4); |
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
<form role="search" method="get" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<input type="search" class="field" name="s" value="<?php _e( 'search', 'wpex' ); ?>" placeholder="<?php _e( 'search', 'wpex' ); ?>" | |
</form> |
OlderNewer