Skip to content

Instantly share code, notes, and snippets.

View loorlab's full-sized avatar
💻
💥👩‍🚀👨‍🚀💥

LOOR Lab loorlab

💻
💥👩‍🚀👨‍🚀💥
View GitHub Profile
@loorlab
loorlab / ACF_Relationship_WP.php
Created September 2, 2023 22:32
ACF Relationship - Shortcode
<?php
/* Recent Post | image */
function show_related_posts($atts) {
$atts = shortcode_atts(array(
'post_id' => get_option('page_on_front'),
), $atts);
$related_post_ids = get_field('recent_post', $atts['post_id']);
if ($related_post_ids) {
@loorlab
loorlab / select_populate_v1.js
Last active August 18, 2023 11:37
JS Populate V1 by @loorlab
jQuery(document).ready(function($){
// Array Municipios Listado
var antioquía = [
{display: "MEDELLÍN", value: "MEDELLÍN" },
{display: "ABEJORRAL", value: "ABEJORRAL" },
{display: "ABRIAQUÍ", value: "ABRIAQUÍ" },
{display: "ALEJANDRÍA", value: "ALEJANDRÍA" },
{display: "AMAGÁ", value: "AMAGÁ" },
{display: "AMALFI", value: "AMALFI" },
@loorlab
loorlab / minifier.php
Created August 7, 2023 02:44 — forked from abranhe/minifier.php
WordPress Minifier
<?php
/**
* W3C Fix and HTML minifier
* Nobody knows how this work, so don't touch it!!!
*
* https://wordpress.stackexchange.com/a/227896/129134
* https://stackoverflow.com/a/41148695
*/
@loorlab
loorlab / load_multiple_gltf_models.js
Created June 9, 2023 21:49
Load Multiple GLTF - Three.js
const gltfLoader = new GLTFLoader()
// Array de archivos GLTF
const gltfFiles = [
'models/Model/glTF/model1.gltf',
'models/Model/glTF/model2.gltf'
//'models/Model/glTF/other_model.gltf'
];

.htaccess Snippets

NOTE: .htaccess files are for people that do not have rights to edit the main server configuration file. They are intrinsically slower and more complicated than using the main config. Please see the howto in the httpd documentation for further details.

Disclaimer: While dropping the snippet into an .htaccess file is most of the time sufficient, there are cases when certain modifications might be required. Use at your own risk.

IMPORTANT: Apache 2.4 introduces a few breaking changes, most notably in access control configuration. For more information, check the upgrading document as well as this issue.

Credits

What we are doing here is mostly collecting useful snippets from all over the interwebs (for example, a good chunk is from Apache Server Configs) into one

@loorlab
loorlab / recursos_libres_roadmap_educacion.md
Last active April 23, 2023 15:35
Recursos para la ruta de Desarrollador - Educación : by @loorlab

Introducción

Requerido para cualquier ruta

GIT - Version Control

Basic Terminal Use

Data Structures & Algorithms

<?php
// Trigger Holiday Mode
add_action ('init', 'bbloomer_woocommerce_holiday_mode');
// Disable Cart, Checkout, Add Cart
function bbloomer_woocommerce_holiday_mode() {
@loorlab
loorlab / functions.php
Created March 18, 2023 04:58 — forked from mrwweb/functions.php
Example Child Theme Files
<?php
/*
Important!
Make sure to replace {my_} with your theme's unique prefix.
All future functions you write should use that same prefix.
Example: mrwnten_parent_theme_enqueue_styles()
*/
add_action( 'wp_enqueue_scripts', '{my_}parent_theme_enqueue_styles' );
@loorlab
loorlab / aws_ec2_ftp_credentials_AP.md
Created June 21, 2019 22:03
WordPress on EC2 Requires FTP Credentials to Install Plugins - AWS

sudo chown -R apache:apache /var/www/html/blog/

@loorlab
loorlab / cf7_mensajes_confirmacion_esp_contact_form_7_WP
Last active February 4, 2023 21:29
Mensajes de Plugin Contact Form 7 WordPress en Español - CF7 > 2023
* Sender's message was sent successfully
- Thank you for your message. It has been sent.
> Gracias por tu mensaje. Ha sido enviado.
* Sender's message failed to send
- There was an error trying to send your message. Please try again later.
> Error al intentar enviar tu mensaje. Por favor, inténtalo de nuevo más tarde.
* Validation errors occurred
- One or more fields have an error. Please check and try again.