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
//Dont forget to set how many items you want on each page in "Settings > Reading > Blog pages show at most" | |
<?php | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
// WP_Query arguments | |
$args = array ( | |
'pagination' => true, | |
'paged' => $paged, | |
'order' => 'ASC' | |
); |
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
/** Register Topads widget area */ | |
genesis_register_sidebar( array( | |
'id' => 'topads', | |
'name' => __( 'Hero Area', 'custom-theme' ), | |
'description' => __( 'Here you can place a hero ad or a slider', 'custom-theme' ), | |
) ); | |
/** Add topads widget after the primary menu */ | |
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 admin style sheet | |
function my_admin_head() { | |
$whodat = get_current_user_id(); | |
if ($whodat == 2) { | |
echo '<link href="' .get_bloginfo('stylesheet_directory'). '/css/admin-menu.css" rel="stylesheet" type="text/css">'; | |
} | |
} | |
add_action('admin_head', 'my_admin_head'); |
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: Events Search Page | |
*/ | |
global $query_string; | |
$query_args = explode("&", $query_string); | |
//this is where you would normally put your $args array | |
$search_query = array(); |
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 | |
/* | |
Plugin Name: Custom Mini Cart | |
Plugin URI: https://www.zendesignfitm.com/ | |
Description: A widget framework for jewelry dropdown. | |
Version: 1.0 | |
Author: Joey Z | |
Author URI: https://www.zendesignfirm.com/ | |
License: GPL | |
*/ |
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
// This function loads the plugin. | |
function jz_load_plugin() { | |
if (!class_exists('Vintage_Engagement_Widget')) { | |
// load Vintage Engagement Widget if not already loaded | |
include_once(TEMPLATEPATH.'/plugins/vintage_engagement_widget.php'); | |
} | |
if (!class_exists('Jewelry_Widget')) { | |
// load Vintage Engagement Widget if not already loaded | |
include_once(TEMPLATEPATH.'/plugins/jewelry_widget.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
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> | |
<div class="row"> | |
<div class="large-12 columns"> | |
<div class="row collapse"> | |
<div class="small-10 columns"> | |
<input type="text" name="s" id="s" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" placeholder="Type event keywords here ..."/> | |
</div> | |
<div class="small-2 columns"> | |
<input type="hidden" name="post_type" value="events" /> | |
<input type="submit" id="searchsubmit" value="Search Events" class="button [secondary success ] postfix"/> |
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
//Goes in functions.php | |
// Change number or products per row to 3 | |
add_filter('loop_shop_columns', 'loop_columns'); | |
if (!function_exists('loop_columns')) { | |
function loop_columns() { | |
return 3; // 3 products per row | |
} | |
} |
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
<div class="row"> | |
<div class="archive-header"> | |
<?php | |
//firs argument of the action is WHERE the function hooks into | |
add_action( 'woocommerce_before_main_content', 'woocommerce_category_image', 2 ); | |
function woocommerce_category_image() { | |
if ( is_product_category() ){ | |
global $wp_query; | |
$cat = $wp_query->get_queried_object(); | |
$thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true ); |
OlderNewer