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(function(){ | |
jQuery('input, textarea').each(function(){ | |
var txtval = jQuery(this).val(); | |
jQuery(this).focus(function(){ | |
jQuery(this).val('') | |
}); | |
jQuery(this).blur(function(){ | |
if(jQuery(this).val() == ""){ | |
jQuery(this).val(txtval); | |
} |
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 to functions.php | |
remove_action('woocommerce_pagination', 'woocommerce_catalog_ordering', 20 ); |
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 to functions.php | |
remove_action( 'woocommerce_before_main_content', | |
'woocommerce_breadcrumb', 20, 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
//Put this in your root index.php file | |
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors','On'); |
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 this to template.php | |
function YOURTHEME_theme(&$existing, $type, $theme, $path){ | |
$hooks = array(); | |
// Make user-register.tpl.php available | |
$hooks['user_register_form'] = array ( | |
'render element' => 'form', |
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
/* functions.php */ | |
<?php | |
class description_walker extends Walker_Nav_Menu | |
{ | |
function start_el(&$output, $item, $depth, $args) | |
{ | |
global $wp_query; | |
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; | |
$class_names = $value = ''; |
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 | |
$block = block_load('module_name', 'block_name'); | |
$output = drupal_render(_block_get_renderable_array(_block_render_blocks(array($block)))); | |
print $output; | |
//module_name is the name of module that outputs the block, eg. webform | |
//block_name is the name of the block, you can find it out by hovering on configure link on block admin page, eg. client-block-19 |
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 | |
$query = new EntityFieldQuery(); | |
$query->entityCondition('entity_type', 'node') | |
->propertyCondition('status', 1) | |
->propertyCondition('type', array('slider_gornji')) | |
->propertyOrderBy('created', 'DESC') | |
->range(0, 5); | |
$result = $query->execute(); | |
$nodes = node_load_multiple(array_keys($result['node'])); |
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 $class = ($x%2 == 0)? 'odd': 'even'; ?> |
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 this to functions PHP | |
function pippin_add_taxonomy_filters() { | |
global $typenow; | |
// an array of all the taxonomyies you want to display. Use the taxonomy name or slug | |
$taxonomies = array('product-category'); | |
// must set this to the post type you want the filter(s) displayed on |