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
<!-- Swiper --> | |
<div class="swiper-container two"> | |
<div class="swiper-wrapper"> | |
<div class="swiper-slide"> | |
<div class="slider-image"> | |
<img src="https://theme-land.com/sapp/demo/assets/img/screenshots/3.jpg" alt="slide 1"> | |
</div> | |
</div> | |
<div class="swiper-slide"> | |
<div class="slider-image"> |
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 | |
namespace App\Models; | |
class StockProduct | |
{ | |
private $pdo; | |
public function __construct(\PDO $pdo) |
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 | |
//Cria uma função pra retornar os slugs da taxonomia de um post | |
function getSlugsTaxonomy($post_id) { | |
$terms = wp_get_post_terms( $post_id, 'nome_da_sua_taxonomia', array( 'fields' => 'all' ) ); | |
$results = array(); | |
foreach($terms as $term) { | |
$results[] = $term->slug; | |
} | |
return $results ? implode(' ', $results) : ''; |
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(){ | |
//Seleciona todos os elementos que tem data-list pra definir o filtro | |
const items = document.querySelectorAll("a[data-list]"); | |
//seleciona todos os cards que serão exibidos ou não | |
const cards = document.querySelectorAll(".card"); | |
//perccore cada link e aplica um evento click |
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 | |
//Pega as taxonomias criadas criadas | |
$terms = get_terms( array( | |
'taxonomy' => 'nome_da_sua_taxonomia', | |
'hide_empty' => false, | |
) ); | |
//Pega todos os posts do tipo criado | |
$wp = new WP_Query(array( |
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
jQuery(function($){ | |
//Clicar no botão para selecionar imagem | |
$(".add_taxonomy_image").on('click', function(event) { | |
event.preventDefault(); | |
$this = $(this); | |
var frame = wp.media(); | |
frame.open(); | |
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 | |
//Valor a ser pesquisado | |
$search = 'Loja'; | |
/* | |
Pesquisando pelo termo | |
Primeiro Parametro: Campo a ser pesquisado (name) | |
Segundo Parametro: Valor a ser pesquisado | |
Terceiro Parametro: Nome da Taxonomia a ser pesquisado |
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="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Documento</title> | |
</head> | |
<body> | |
<script src="js/variavel-var.js"></script> | |
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 add_file_and_ext_webp( $types, $file, $filename, $mimes ) { | |
if ( false !== strpos( $filename, '.webp' ) ) { | |
$types['ext'] = 'webp'; | |
$types['type'] = 'image/webp'; | |
} | |
return $types; | |
} |
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 | |
//Inicia Session | |
session_start(); | |
//Chama a funcões dos produtos | |
require_once "functions/product.php"; | |
//chama as funções do carrinhos | |
require_once "functions/cart.php"; | |
//Chama a conexão | |
$pdoConnection = require_once "connection.php"; |
NewerOlder