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
$post_count = do_shortcode("[dot_recommends ID='$item->ID']"); |
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
/* | |
* To run the deployment | |
* 1. Login as an administrator | |
* 2. Go to http://yourdomain.com/?deploy_changes=1 | |
*/ | |
function deploy_changes() { | |
// If the request is not our deployment | |
if ( !isset( $_GET['deploy_changes'] ) ) { | |
return; |
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 | |
/** | |
* WooCommerce Extra Feature | |
* -------------------------- | |
* | |
* Register a shortcode that creates a product categories dropdown list | |
* | |
* Use: [product_categories_dropdown orderby="title" count="0" hierarchical="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 | |
/* | |
* A walker class to use that extends wp_dropdown_categories and allows it to use the term's slug as a value rather than ID. | |
* | |
* See http://core.trac.wordpress.org/ticket/13258 | |
* | |
* Usage, as normal: | |
* wp_dropdown_categories($args); | |
* |
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
new SH_Walker_TaxonomyDropdown(), | |
'value'=>'slug', | |
'show_option_none' => __('Select a Category', 'dot'), | |
'taxonomy' => 'product_cat', | |
'id' => 'product_cat_dropdown', | |
'name' => 'product_cat', | |
'orderby' => 'name', | |
'child_of' => 0, | |
//'selected' => $wp_query->query['term'], | |
'hierarchical' => 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
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); | |
function woo_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); // Remove the description tab | |
unset( $tabs['reviews'] ); // Remove the reviews tab | |
unset( $tabs['additional_information'] ); // Remove the additional information tab | |
return $tabs; |
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 Additional country to the country select field | |
------------------------------------------------------------ | |
*/ | |
add_filter("gform_countries", "add_aruba"); |
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 | |
// http://www.paulund.co.uk/redirect-login-wordpress | |
function redirect_home( $redirect_to, $request, $user ) | |
{ | |
return home_url(); | |
} | |
add_filter( 'login_redirect', 'redirect_home' ); |
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: Contact | |
*/ | |
?> | |
<?php | |
//If the form is submitted | |
if(isset($_POST['submitted'])) { |
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_shortcode( 'dot_recommended_posts', array( &$this, 'dot_recommended_top_posts' ) ); | |
function dot_recommended_top_posts( $atts, $content = null ) | |
{ | |
// get our variable from $atts | |
$atts = shortcode_atts( array( | |
'container' => 'li', | |
'number' => '10', |
OlderNewer