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
.hentry.featured { | |
border-bottom: 15px solid #f6f6f6; | |
padding-bottom: 1em; | |
.singular & { | |
border-bottom: 0; | |
padding-bottom: 0; | |
} | |
} |
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 | |
$category = get_the_category(); | |
if( $category[0] ){ | |
echo '<a href="' . get_category_link( $category[0]->term_id ) . '">' . __( 'View All Posts', 'justins-textdomain' ) . '</a>'; | |
} |
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
add_shortcode( 'entry-modified', 'krogs_entry_modified_shortcode' ); | |
function krogs_entry_modified_shortcode( $attr ) { | |
$domain = hybrid_get_textdomain(); | |
$attr = shortcode_atts( array( 'before' => '', 'after' => '', 'format' => get_option( 'date_format' ) ), $attr ); | |
$modified = '<abbr class="modified" title="' . sprintf( get_the_modified_time( esc_attr__( 'l, F jS, Y, g:i a', $domain ) ) ) . '">' . sprintf( get_the_modified_time( $attr['format'] ) ) . '</abbr>'; | |
return $attr['before'] . $modified . $attr['after']; | |
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 if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<?php // You can do stuff here to display aspects of the posts which meet the criteria of the current loop. ?> | |
<?php endwhile; else: ?> | |
<p><?php _e('The Loop did not find anything.'); ?></p> | |
<?php endif; ?> |
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
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
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 $args = array( | |
'post_type' => array ( 'post', 'page' ), | |
'posts_per_page' => 1, | |
'paged' => ( get_query_var('page') ? get_query_var('page') : 1 ) | |
); ?> | |
<?php query_posts( $args ); ?> | |
<?php if ( have_posts() ) : ?> |
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 function to widgets_init that'll load our widget. | |
* @since 0.1 | |
*/ | |
add_action( 'widgets_init', 'latest_load_widgets' ); | |
/** | |
* Register our widget. | |
* 'Latest_Tweet_Widget' is the widget class used below. |
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_filter( 'gettext', 'krogs_event_change_venue_name', 20, 3 ); | |
/** | |
* Change comment form default field names. | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
*/ | |
function krogs_event_change_venue_name( $translated_text, $text, $domain ) { |
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
<li class="product"> | |
<a href="http://wp.com/shop/product-title/"> | |
<img width="150" height="150" src="http://wp.com/wp-content/uploads/2012/06/IMAGE-150x150.jpg" class="attachment-shop_catalog wp-post-image" alt="ACCUTACT ANGLESIGHT" title="ACCUTACT ANGLESIGHT"> | |
<h3>Product Title</h3> | |
<span class="price"><span class="amount">$250</span></span> | |
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 | |
/* | |
* goes in theme functions.php or a custom plugin | |
* | |
**/ | |
add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src'); | |
function custom_woocommerce_placeholder_img_src( $src ) { |
OlderNewer