Skip to content

Instantly share code, notes, and snippets.

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

Sebastian Ortiz dsebao

🏠
Working from home
View GitHub Profile
@dsebao
dsebao / info.md
Created February 14, 2020 03:49 — forked from ajitbohra/info.md
Laravel Development Using Local By FlyWheel
  • Use local site "app" fodler as root for Laravel
  • Create a .env file using info from Local site domain
  • CLI Run php artisan key:generate
  • CLI Run php artisan config:cache
@dsebao
dsebao / flywheel-local-xdebug-vscode.md
Created December 4, 2019 02:11 — forked from ahmadawais/flywheel-local-xdebug-vscode.md
Debug WordPress with Visual Studio Code | VSCode WordPress Debug Setup | WordPress xDebug Setup for Local by FlyWheel with VSCode | Part of the VSCode Learning Course → https://VSCode.pro

VSCode WordPress Debugging Setup: WordPress Xdebug Setup for Local by FlyWheel with VSCode


Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User

🚅 TL;DR

  • Make sure your Local by FlyWheel WordPress install is a custom install
@dsebao
dsebao / gulpfile.js
Created December 3, 2019 05:24
Basic Gulpfile.js config
const gulp = require('gulp');
sass = require('gulp-sass');
autoprefixer = require('gulp-autoprefixer');
gulp.task('sass',function(){
return gulp.src('/scss/*.scss')
.pipe(sass({
outputStyle: 'expanded'
}))
.pipe(autoprefixer({
@dsebao
dsebao / wordpress-custom-walker-menu.php
Created December 3, 2019 02:12 — forked from dhanyn10/wordpress-custom-walker-menu.php
Simple guide to creating your own custom wordpress Walker Menu, insert to functions.php
<?php
/*
=====================
custom menu
=====================
<ul>
<1><3></4></2>
<1>
<3></4>
<5>
@dsebao
dsebao / class-property-factory.php
Created November 23, 2019 07:08
Cambio de currency simbol (USD y $ dependiendo el tipo de listing)
//Archivo dentro del plugin Realty Portal Listing
// includes/property/library/
//Linea 434
public function get_price() {
$price = trim( get_post_meta( $this->ID, 'price', true ) );
//Agregue un argumento mas en el rp_format_price que es el ID para que dentro de la funcion
<?php
//In ajax.php
function sendPublicform(){
if($_POST['typeform'] == 'sometypeform'){
//some actions
wp_send_json(array('success' => true,'message' => __('Saved','themedomain')));
}
}
add_action('wp_ajax_sendPublicform', 'sendPublicform');
<?php
//define post type
'post_type' => 'post',
//Disable cache
$query = get_posts( array( 'posts_per_page' => 1, 'cache_results' => false ) );
//No terms cache
'update_post_term_cache' => false,
<?php
if (defined('WP_DEBUG_LOG') && WP_DEBUG_LOG) {
ini_set( 'error_log', WP_CONTENT_DIR . '/themes/{{themename}}/log.txt' );
}
<link rel="apple-touch-icon" sizes="180x180" href="fav/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="fav/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="fav/favicon-16x16.png">
<link rel="manifest" href="fav/site.webmanifest">
<link rel="mask-icon" href="fav/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="fav/favicon.ico">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-config" content="fav/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="screen.css" media="screen">
<style media="screen">
body {
background-color: #f0f0f0;
font: 1em/150% verdana, arial, helvetica, sans-serif;
text-align: center;
}
#container {