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
# WordPress single blog rules. | |
# Designed to be included in any server {} block. | |
# This order might seem weird - this is attempted to match last if rules below fail. | |
# http://wiki.nginx.org/HttpCoreModule | |
location / { | |
try_files $uri $uri/ /index.php?$args; | |
} | |
# Add trailing slash to */wp-admin requests. |
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 | |
function pagination($pages = '', $range = 4) | |
{ | |
$showitems = ($range * 2)+1; | |
global $paged; | |
if(empty($paged)) $paged = 1; | |
if($pages == '') | |
{ |
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
// box orcamento | |
.box-orcamento | |
background-color: #1D2853 | |
width: 200px | |
position: fixed | |
right: 0 | |
bottom: 10% | |
border-radius: 10px 0px 0px 10px | |
@media ($break-xs) |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} -d [OR] | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteRule ^ ^$1 [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
<?php | |
$cidade = "belo horizonte"; | |
echo $_SERVER['HTTP_CLIENT_IP']; | |
$ip = $_SERVER['HTTP_CLIENT_IP']; // your ip address here | |
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip)); | |
if($query && $query['status'] == 'success') | |
{ | |
if($cidade == strtolower($query['city'])){ | |
echo "aqui é BH <br>"; | |
} |
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
.fullscreen-bg | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
overflow: hidden; | |
z-index: -100; | |
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 | |
$menuLaranja = "#FF5c00"; | |
if (is_page('servicos')) { ?> | |
<style> | |
.menu_scrool{ | |
/* classe que o header pega quando da o scrool */ | |
background-color: <?= $menuLaranja ?> | |
} | |
</style> | |
<?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
<!-- carrega os posts --> | |
<div id="load-questions" class="row load-questions"></div> | |
<p class="text-center section-btn"> | |
<!-- Realiza o clique sempre adicionando 1 --> | |
<a href="" class="btn btn-site btn-load-questions" data-pagination="1"> | |
<i class="icon icon-plus"></i> Perguntas | |
</a> | |
</p> |
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
// inicia a variavel em 1 pois é a primeira carga | |
var resultPagination = 1; | |
// executa o load de acordo com o click no botao | |
$(document).on('click', '.btn-load-questions',function(){ | |
var pagination = $(this).data('pagination'); // recebe o valor do data-pagination no html | |
// recebe o data-pagination e acrescenta o valor inicial + ele mesmo | |
resultPagination = resultPagination + 1; | |
// cria um efeito de load com gif | |
carregaGifLoad(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
<?php | |
// executa o load de questões na home do site | |
add_action('wp_ajax_load', 'load'); | |
add_action('wp_ajax_nopriv_load', 'load' ); // aparentemente não é obrigatorio utilizar este action | |
// funcao propriamente dita | |
function load(){ | |
$paged = $_GET['paged']; |
NewerOlder