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 Capabilities for Custom Post type | |
add_action( 'init', 'create_my_post_types' ); | |
function create_my_post_types() { | |
register_post_type( | |
'movie', | |
array( | |
'public' => true, | |
'capability_type' => 'movie', |
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 | |
// Create category.php file & put this code | |
/** | |
* Custom Category Template | |
**/ | |
// Remove default loop | |
//remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
function wps_category_loop_args() { | |
return array( | |
'category_name' => get_query_var( 'category_name' ), |
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
// Add cart price and quantity in header.liquid file | |
{{ cart.item_count }} {{ cart.item_count | pluralize: 'Item', 'Items' }} ({{ cart.total_price | money }}) |
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
<style> | |
.container { | |
width:600px; | |
margin:0 auto; | |
} | |
.row { | |
line-height:24pt; | |
border: solid 1px black; | |
} | |
.row:nth-of-type(2n+1) |
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 | |
/* Genesis Custom Home Page Template */ | |
function child_grid_loop_helper() { | |
genesis_grid_loop( array( | |
'features' => 2, | |
'feature_image_size' => 'child_full', | |
'feature_image_class' => 'aligncenter post-image', | |
'feature_content_limit' => 0, |
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
<div id="content"> | |
<?php | |
$new_query = new WP_Query(); | |
$new_query->query('post_type=post&showposts=1'.'&paged='.$paged); | |
?> | |
<?php while ($new_query->have_posts()) : $new_query->the_post(); ?> | |
<?php the_title(); ?> | |
<?php endwhile; ?> |
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 CSS & JS files in WP functions */ | |
function wp_elevate_zoom_add_scripts() { | |
// Load jQuery if it isn't already | |
wp_enqueue_script('jquery'); | |
// Load custom jQuery | |
wp_register_script('wpez-min-jquery', get_bloginfo('template_url') . '/elevate-zoom/js/jquery-1.8.3.min.js', array( 'jquery' ), null, true ); | |
wp_enqueue_script( 'wpez-min-jquery' ); |
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
<style> | |
.video { position: relative; } | |
.video a { | |
position: absolute; | |
display: block; | |
background: url(play.png) no-repeat; | |
height: 32px; | |
width: 32px; | |
top: 28px; |
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
/* Display all products from same Collections in loop */ | |
<ul> | |
{% for product in collections.collection-1.products %} | |
<li{% cycle 'group1': ' style="clear:both;"', '', '', ' class="last"' %}> | |
<a href="{{ product.url | within: collection }}"> | |
<img src="{{ product.featured_image.src | product_img_url: "medium" }}" alt="{{ product.featured_image.alt }}" /> | |
</a> | |
</li> | |
{% endfor %} |
OlderNewer