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( 'wp_image_editors', 'change_graphic_lib' ); | |
function change_graphic_lib($array) { | |
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); | |
} | |
/* Add on functions.php */ |
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
<ul class="products"> | |
<?php | |
$user_id = get_current_user_id(); | |
$current_user= wp_get_current_user(); | |
$customer_email = $current_user->email; | |
$args = array( | |
'post_type' => 'product', | |
'posts_per_page' => 12 | |
); | |
$loop = new WP_Query( $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
function add_theme_scripts() { | |
wp_enqueue_style( 'style', get_stylesheet_uri() ); | |
wp_enqueue_style( 'css', get_template_directory_uri() . '/css/estilo.css', array(), '1.1', 'all'); | |
wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), 1.1, true); | |
} | |
add_action( 'wp_enqueue_scripts', 'add_theme_scripts' ); |
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 wpufe_update_post_price( $post_id ) { | |
$price = get_post_meta( $post_id, '_price', true ); | |
update_post_meta( $post_id, '_regular_price', $price ); | |
} | |
add_action( 'wpuf_add_post_after_insert', 'wpufe_update_post_price' ); | |
add_action( 'wpuf_edit_post_after_update', 'wpufe_update_post_price' ); |
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
INSERT INTO `wp_terms` (`term_id`, `name`, `slug`, `term_group`) VALUES | |
(63, 'AC', 'ac', 0), | |
(64, 'Acre', 'acre', 0), | |
(65, 'Acrelândia', 'acrelandia', 0), | |
(66, 'Assis Brasil', 'assis-brasil', 0), | |
(67, 'Brasiléia', 'brasileia', 0), | |
(68, 'Bujari', 'bujari', 0), | |
(69, 'Capixaba', 'capixaba', 0), | |
(70, 'Cruzeiro do Sul', 'cruzeiro-do-sul', 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
function traduz_texto_wp( $translated ) { | |
$text = array( | |
'Exemplo' => 'Resultado', | |
'Exemplo' => 'Resultado', | |
'Exemplo' => 'Resultado', | |
); | |
$translated = str_ireplace( array_keys($text), $text, $translated ); | |
return $translated; | |
} | |
add_filter( 'gettext', 'traduz_texto_wp', 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 echo get_post_meta( $post->ID, 'META', 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
$(document).ready(function(){ | |
$('#primeiro').change(function() { | |
$('#segundo').val($('#primeiro').val()); | |
}); | |
}); | |
/** Change text from $primeiro to $segundo after type **/ | |
$(document).ready(function(){ | |
$('#primeiro').keyup(function() { | |
$('#segundo').val($('#primeiro').val()); |
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
/* Duplicate and edit*/ | |
/avada/search.php +/ /avada/search-filter-results.php | |
remove line 71-74 { | |
$post_timestamp = strtotime($post->post_date); | |
$post_month = date('n', $post_timestamp); | |
$post_year = get_the_date('o'); | |
$current_date = get_the_date('o-n'); | |
} |
OlderNewer