View update_row_colours.js
jQuery(document).ready(function($) { | |
var update_row_colours = function() { | |
$('[data-name="adicionar_experiencias"] .acf-table .acf-row').each( function() { | |
var strat = $( this ).find('[data-name="iniciou_no_dia"] input.input-alt'); | |
var end = $( this ).find('[data-name="terminou_no_dia"] input.input-alt'); | |
var strat_date = new Date( strat.val() ); |
View function.php
<?php | |
// Remove Options | |
add_filter( 'woocommerce_catalog_orderby', 'custom_woocommerce_remove_filter' ); | |
function custom_woocommerce_remove_filter( $catalog_orderby ) { | |
unset( $catalog_orderby['popularity'] ); | |
unset( $catalog_orderby['rating'] ); | |
unset( $catalog_orderby['price'] ); | |
unset( $catalog_orderby['price-desc'] ); | |
return $catalog_orderby; | |
} |
View README.md
Borda Serrilhada Somente com CSS 3
Criar Borda Serrilhada Somente com CSS3
Códigos referentes ao post
View README.md
Formulário de Departamentos com Suporte de Option Group
Contact Form 7 + Option Group
Criação de um formulário via Contact Form 7 com select personalizado com Option Group para seleção de departamentos.
Download do Contact Form 7
View functions.php
<?php | |
/** | |
* Returns ID of top-level parent category, or current category if you are viewing a top-level | |
* | |
* @param string $catid Category ID to be checked | |
* @return string $catParent ID of top-level parent category | |
*/ | |
function smart_category_top_parent_id ($catid) { | |
while ($catid) { | |
$cat = get_category($catid); // get the object for the catid |
View functions.php
<?php | |
function chr_redirect_post_type() { | |
global $wp_query; | |
if ( is_post_type_archive('sliders') || is_singular('sliders') ) : | |
$url = get_bloginfo('url'); | |
wp_redirect( esc_url_raw( $url ), 301 ); | |
exit(); | |
endif; | |
} | |
add_action ( 'template_redirect', 'chr_redirect_post_type', 1); |
View trim-words-meta.php
<?php | |
global $post; | |
$trim_length = 450; //desired length of text to display | |
$summary_excerpt = 'wpcf-breve-descricao'; | |
$value = get_post_meta($post->ID, $summary_excerpt, true); | |
if ($value != '') { | |
if(strlen($value) <= $trim_length){ | |
echo apply_filters('breve-descricao', $value); | |
} else { | |
echo apply_filters('breve-descricao', rtrim(substr($value,0,$trim_length)).'...'); |
View show_future_post.php
<?php | |
add_filter('the_posts', 'show_future_posts'); | |
function show_future_posts($posts) | |
{ | |
global $wp_query, $wpdb; | |
if(is_single() && $wp_query->post_count == 0) | |
{ | |
$posts = $wpdb->get_results($wp_query->request); |
View filter-featured-more-category.php
<?php | |
$query_args = array( | |
'post_type' => 'product', | |
'product_cat' => SLUG-YOUR-CATEGORY, | |
'post_status' => 'publish', | |
'ignore_sticky_posts' => 1, | |
'posts_per_page' => 3, | |
'meta_query' => array( | |
array( | |
'key' => '_visibility', |