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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Autocomplete Search With Semantic UI</title> | |
<link rel="stylesheet" href="semantic/dist/semantic.css"> | |
</head> | |
<body> | |
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
<% | |
Function inArray(byVal value, byVal my_array) | |
Dim i | |
inArray = false | |
For i=0 To Ubound(my_array) | |
If (my_array(i) = value) Then | |
inArray = true | |
Exit Function | |
End If |
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 Custom Post Type | |
function c4n_new_post_type() { | |
$labels = array( | |
'name' => _x( 'Journals', 'Post Type General Name', 'turing_press' ), | |
'singular_name' => _x( 'Journal', 'Post Type Singular Name', 'turing_press' ), | |
'menu_name' => __( 'Journals', 'turing_press' ), | |
'parent_item_colon' => __( 'Parent Journal:', 'turing_press' ), | |
'all_items' => __( 'All Journals', 'turing_press' ), | |
'view_item' => __( 'View Journal', 'turing_press' ), |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Multiple Modals With Semantic UI</title> | |
<link rel="stylesheet" href="path_to_semantic/dist/semantic.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
<script src="path_to_semantic/dist/semantic.js"></script> | |
</head> | |
<body> |
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
/* Woocommerce Shipping */ | |
// Hide standard shipping when free is available | |
// Original script https://gist.github.com/pauloiankoski/9707209 | |
add_filter( 'woocommerce_available_shipping_methods', 'mf_hide_standard_shipping_when_free_is_available' , 10, 1 ); | |
function mf_hide_standard_shipping_when_free_is_available( $available_methods ) { | |
global $woocommerce; | |
// First the free shipping method is only available to local delivery |
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 | |
/* Subcategories of "Journals" (id: 6) */ | |
$categories = get_categories('child_of=6&hide_empty=0'); | |
foreach ($categories as $cat): | |
/* This get the total of posts in current category of the loop.*/ | |
$total_of_posts_in_category = (int) $cat->count; | |
$current_category_name = $cat->name; | |
/* For each category, make the loop for the amount of posts */ |
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
/* @author: Marcos Freitas */ | |
/* | |
* Into function triggerSlider() replace the call for the function triggerEffects() | |
*/ | |
// passing the limite of recursive executions | |
triggerEffects(10); | |
/* |
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
/** | |
* Dropdown de categorias para design responsivo | |
* Pegando as categorias dos produtos de acordo com os argumentos passados | |
*/ | |
$args = array( 'number' => $number, 'orderby' => $orderby, 'order' => $order, 'hide_empty' => true, 'include' => $ids ); | |
$product_categories = get_terms( 'product_cat', $args ); | |
?> | |
<ul id="list-widget-responsive"> | |
<li id="" class="widget widget-responsive woocommerce widget_product_categories"> |
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
/* ========================================================================== | |
Buttons Class Configurations | |
========================================================================== */ | |
/* | |
* Redefinition to bootstrap buttons | |
*/ | |
.btn, .btn[disabled], .btn:focus, .btn:hover, .btn:active{ | |
color: #333; | |
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); |
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 | |
/*É preciso tratar a string da descrição do câmbio pq o html vem sujo com IDs duplicados*/ | |
$item['n_content'] = trim((string) $attr->description); | |
/* | |
exemplo de conteúdo: | |
<img src='http://imguol.com/c/noticias/2014/07/17/17jul2014---um-aviao-de-passageiros-da-malaysia-airlines-com-295-pessoas-bordo-caiu-na-ucrania-na-regiao-de-fronteira-com-a-russia-de-acordo-com-informacoes-da-agencia-russa-de-noticias-interfax-1405612628026_142x100.jpg' align="left" /> | |
Veja o Álbum de fotos | |
*/ |