Skip to content

Instantly share code, notes, and snippets.

View luisgagocasas's full-sized avatar
💙
CEO at AyPhu

Luis Gago Casas luisgagocasas

💙
CEO at AyPhu
View GitHub Profile
@luisgagocasas
luisgagocasas / content-advisory.blade.php
Created December 4, 2018 17:13
Bootstrap 4 carousel making dynamic with PHP
<section class="slider-advisory">
<div class="container p-0">
@php
$wp_query = new WP_Query(
array(
'post_type' => 'advisory',
'post_status' => 'publish',
'posts_per_page' => -1
)
);
@luisgagocasas
luisgagocasas / home.blade.php
Last active November 12, 2018 01:45
how to detect with elementor if I am on the site or in the administrator - root sage - Elementor pro
<!doctype html>
<html @php(language_attributes())>
@include('partials.head')
<body @php(body_class())>
@php(do_action('get_header'))
@if (elementor_location_exits( 'header_content', true ))
@include('partials.header')
@else
@include('partials.header-home')
@endif
var items = "";
$.getJSON( "http://localhost/wordpress/?page_id=246&json=1", function(data) {
for (var i = 0; i < data.page.comments.length; i++) {
items += '<p>'+data.page.comments[i].name+'</p>>';
}
$("#lista_comentarios").html(items);
})
@luisgagocasas
luisgagocasas / Leer-API-REST-con-PHP.php
Last active February 11, 2016 19:46
Leer una API REST de wordpress desde PHP
<?php
//PRIMERA OPCION - funciones nativas php
//Optengo la API REST
$url = "http://localhost/wordpress/?page_id=2&json=1";
$data = file_get_contents($url);
$json = json_decode($data);
//Muestro los resultados
echo "<p>".$json->status."</p>";
echo "<p>".$json->page->id."</p>";
@luisgagocasas
luisgagocasas / install-ispconfig3-ubuntu.sh
Last active October 4, 2015 04:07
Install ISPConfig3 Ubuntu 14.04 64Bits
#!/bin/bash
## Install ISPConfig3 on Ubuntu 14.04 64Bits
## Author Original: Nilton OS blog.linuxpro.com.br
## Modificado Español: Luis Gago Casas luisgagocasas.com
## Version 0.6
## Caso precise
## echo 'LC_ALL="en_US.utf8"' >>/etc/environment
## dpkg-reconfigure dash
@luisgagocasas
luisgagocasas / Para que funcione extends en jadephp Grunt
Last active August 29, 2015 14:25
Para que funcione extends en jadephp Grunt
Para que funcione con extends tiene que usar esta configuración en su archivo Gruntfile.js
//base.jade
<!DOCTYPE html>
html(lang="es")
head
meta(charset="UTF-8")
block titulo
title Luis Gago Casas
body
@luisgagocasas
luisgagocasas / Responsive CSS Image Slider - Jade, Stylus
Last active August 29, 2015 14:23
Responsive CSS Image Slider - Jade, Stylus
Responsive CSS Image Slider - Jade, Stylus
------------------------------------------
Preprocessor: Jade Stylus
https://luisgagocasas.com/
A [Pen](http://codepen.io/luisgagocasas/pen/eNyvoz)