Skip to content

Instantly share code, notes, and snippets.

View eliasfaical's full-sized avatar
🏠
Working from home

Elias Faiçal eliasfaical

🏠
Working from home
View GitHub Profile
@eliasfaical
eliasfaical / gist:0ae5258bd6b6dfa1be11ec38f5fa3722
Created December 6, 2023 14:20
Alguns projetos com Wordpress (ACF, Front-end e Layout)
- https://globaltouch.com.br/
- https://balaiodesign.com.br
- https://igom.co/
- https://mazzinigomes.com.br/
- https://extrafruti.com.br/
@eliasfaical
eliasfaical / loop-products-woocommerce.php
Last active September 17, 2023 19:05
Sample products loop - Woocommerce
<ul class="products">
<?php
$args = array( 'post_type' => 'product', 'posts_per_page' => 1, 'product_cat' => 'camisa' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
<h2>Shoes</h2>
<li class="product">
<a href="<?php echo get_permalink( $loop->post->ID ) ?>" title="<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>">
<?php
woocommerce_show_product_sale_flash( $post, $product );
{
// Define o tema do VSCode
"workbench.colorTheme": "Dracula",
// Configura tamanho e família da fonte
"editor.fontSize": 14,
"editor.lineHeight": 28,
"editor.fontFamily": "Fira Code Retina",
"editor.fontLigatures": true,
"explorer.compactFolders": false,
@eliasfaical
eliasfaical / page.php
Created January 24, 2022 16:50
Default page WP
<?php
get_header();
$current_page = basename(get_permalink());
?>
<main id="main" class="site-main main-<?php echo $current_page; ?>">
<?php
switch ($current_page) {
case $current_page:
function abrirWhats(){
$('#blogCarousel').carousel({
interval: 5000
});
// chamar whats
// window.open('https://api.whatsapp.com/send?phone=55839SEUNUMERO&text=Olá,%20quero%20saber%20mais%20sobre%20o%20Centro%20Jurídico', '_blank');
// console.log($("#nome").val());
// console.log($("#email").val());
// console.log($("#telefone").val());
@eliasfaical
eliasfaical / Instructions: How to enqueue the CSS in your theme
Created January 30, 2019 19:07 — forked from gugaalves/custom-login-styles.css
WordPress - Customizing Login, Register and Lost Password pages
STEPS:
1 - If the theme was not developd by you, first create a child theme (How to create a child theme? Read at https://codex.wordpress.org/Child_Themes) or else modifications will be lost when updating your theme.
2 - Add the following CSS file in your theme/child theme (better if you create a folder to add CSS there).
3 - Add the following snippet in your functions.php file:
function tpw_enqueue_custom_admin_style() {
echo '<link rel="stylesheet" type="text/css" href="' . get_stylesheet_directory_uri() . '/css/admin/custom-login-styles.css" />';
}
@eliasfaical
eliasfaical / query.php
Last active March 6, 2021 20:52
Loop post type WP
<?php
/*
* Loop post type: V1
*/
$posts = array(
array( 'post_type' => 'post1', 'post_per_page' => -1 ),
array( 'post_type' => 'post2', 'post_per_page' => -1 ),
array( 'post_type' => 'post3', 'post_per_page' => -1 )
);
<?php
/**
* Template Name: Blog
*/
get_header();
?>
<main id="main" class="site-main innerPage">
<section class="banner-innerPage" style="background-image: url(<?php echo get_template_directory_uri(); ?>/assets/images/banner-conteudo.jpg)">
<div class="container text-center">
@eliasfaical
eliasfaical / gulpfile.js
Created July 10, 2019 13:29 — forked from jasonyingling/gulpfile.js
A simple gulpfile setup for modern JavaScript and SASS
const { src, dest, watch } = require('gulp');
const sass = require('gulp-sass');
const minifyCSS = require('gulp-csso');
const babel = require('gulp-babel');
const concat = require('gulp-concat');
const browserSync = require('browser-sync').create();
function css() {
return src('./sass/*.scss', { sourcemaps: true })
.pipe(sass())
@eliasfaical
eliasfaical / webstoemp-gulpfile.js
Created April 22, 2019 13:09 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");