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 all of this tu custom page template ?> | |
<?php | |
global $wpdb; | |
$error = ''; | |
$success = ''; | |
// check if we're in reset form | |
if( isset( $_POST['action'] ) && 'reset' == $_POST['action'] ) | |
{ |
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
jQuery(".gallery-slider").carouFredSel({ | |
items: 3, | |
circular: true, | |
responsive: true, | |
scroll : { | |
items : 3, | |
duration : 1500, | |
pauseOnHover : true | |
}, | |
prev : { |
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
--Check the attribute id for price first - in this case it's 75 | |
update catalog_product_entity_decimal set value = (value*.05)+value where attribute_id=75 |
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 | |
//TEST AT WHAT DEPTH IS CURRENT CATEGORY | |
$max_depth_to_test = intval(3); //set this to highest depth you might have | |
$last_depth = 0; | |
$cat_to_test = $cat; | |
$category=get_category($cat_to_test); | |
for ( $counter = 1; $counter <= $max_depth_to_test; $counter += 1) { | |
if ($category->category_parent) { | |
$category=get_category($category->category_parent); | |
$last_depth = $counter; |
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
//NEXT/PREV BLOG PAGE LINKS | |
add_filter('next_posts_link_attributes', 'posts_link_attributes_1'); | |
add_filter('previous_posts_link_attributes', 'posts_link_attributes_2'); | |
function posts_link_attributes_1() { | |
return 'class="next btn-gray"'; | |
} | |
function posts_link_attributes_2() { | |
return 'class="prev btn-gray"'; |
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
//Had to define this key in Key Bindings - User because it didn't have it defined on Mac OSX | |
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol", "extend": false} } |
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 | |
getThumbnailImage() | |
getMediumImage() | |
getLargeImage() | |
getFullSizeImage() | |
getPostThumbnailImage() | |
getAvailableImage() | |
getImageByType($type = 'thumbnail') |
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 at the end of wp-config.php file | |
if(is_admin()) { | |
add_filter('filesystem_method', create_function('$a', 'return "direct";' )); | |
define( 'FS_CHMOD_DIR', 0751 ); | |
} |
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
/*Print custom menu links*/ | |
<?php print theme('links', menu_navigation_links('menu-MENU-NAME'), array('id' => 'menu', 'class' => 'links')); ?> |
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('gallery_style', | |
create_function( | |
'$css', | |
'return preg_replace("#<style type=\'text/css\'>(.*?)</style>#s", "", $css);' | |
) | |
); |