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 inline caption width for responsive themes ---*/ | |
add_filter('img_caption_shortcode', 'my_img_caption_shortcode_filter',10,3); | |
function my_img_caption_shortcode_filter($val, $attr, $content = null) | |
{ | |
extract(shortcode_atts(array( | |
'id' => '', | |
'align' => 'aligncenter', | |
'width' => '', |
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 echo date("Y"); ?> |
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 | |
/* | |
Template Name: Template Name | |
*/ | |
?> |
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
<ul> | |
<?php | |
// list product categories | |
$orderby = 'name'; | |
$show_count = 0; | |
$pad_counts = 0; | |
$hierarchical = 1; | |
$taxonomy = 'brands'; | |
$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 $sep = ''; | |
foreach((get_the_category()) as $cat) { | |
echo $sep . '<a href="' . get_category_link($cat->term_id) . '" class="cat-' . $cat->slug . '" title="View all posts in '. esc_attr($cat->name) . '">' . $cat->cat_name . '</a>'; | |
$sep = ', '; | |
} | |
?> |
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 create_meta_box() { | |
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ; | |
$template_file = get_post_meta($post_id,'_wp_page_template',TRUE); | |
// check for a template type | |
if ($template_file == 'homepage.php') { | |
// add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args ); | |
add_meta_box( 'new_meta_box', 'Home Page Blockquote', 'new_meta_box', 'page', 'side', 'low' ); |
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
// custom meta box | |
add_action( 'admin_menu', 'create_meta_box' ); | |
add_action( 'save_post', 'save_meta_box' ); | |
function create_meta_box() { | |
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ; | |
$template_file = get_post_meta($post_id,'_wp_page_template',TRUE); | |
// check for a template type | |
if ($template_file == 'homepage.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
# Gzip compression allows us to drastically reduce out file sizes. This .htaccess snippet does the gzipping for us.. | |
<IfModule mod_deflate.c> | |
# html, xml, css, and js: | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript application/javascript application/json | |
# webfonts and svg: | |
<FilesMatch "\.(ttf|otf|eot|svg)$" > | |
SetOutputFilter DEFLATE | |
</FilesMatch> | |
</IfModule> |
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
<a href="mailto:<?php echo antispambot('[email protected]' ) ?>"><?php echo antispambot('[email protected]') ?></a> |