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
<script> | |
jQuery(document).ready(function($){ | |
$(function() { | |
$('.menu-interno li a').click(function() { /* Define o elemento do clique */ | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html, body').animate({ | |
scrollTop: target.offset().top |
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
/* On loop */ | |
$today = date( 'Y-m-d' ); | |
$date = get_field('data', false, false); /* Get the ACF date field */ | |
$date = new DateTime($date); | |
if(strtotime($today) <= strtotime($date->format('Y-m-d') ) ): /* Verifica se a data do post é menor que a data atual */ |
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 | |
$meta = get_post_meta( $post->ID, 'meta', true); | |
if (!empty($meta)) { ?> | |
Se for nula exibe. | |
<?php } | |
else { ?> | |
Se não for nula exibe. | |
<?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
$wp_rewrite->flush_rules(); |
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 $meta = get_post_meta( $post->ID, 'meta', true); <--! define o valor da variável --> | |
if (!empty($telefone)) { ?> <--! Confere se está vazia ou não --> | |
Resultado caso não seja nula. | |
<?php } else { ?> | |
Resultado caso seja nula. | |
<?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
<?php $user_id = get_current_user_id(); | |
$args=array( | |
'post_type' => 'post', | |
'posts_per_page' => -1, | |
'author' => $user_id | |
); | |
$wp_query = new WP_Query($args); while ( have_posts() ) : the_post(); ?> | |
<!-- Conteudo --> | |
<?php endwhile; ?> |
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
//* Redirect WordPress Logout to Home Page | |
add_action('wp_logout',create_function('','wp_redirect(home_url());exit();')); |
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'); | |
} |
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
<?php echo get_post_meta( $post->ID, 'META', true); ?> |