Skip to content

Instantly share code, notes, and snippets.

View colormono's full-sized avatar
🤓
I’m learning as I go

Mariano Rivas colormono

🤓
I’m learning as I go
View GitHub Profile
Use WordPress default function to get next and previous post title with permalink something like this:
<?php // FOR PREVIOUS POST
$prev_post = get_previous_post();
$id = $prev_post->ID ;
$permalink = get_permalink( $id );
?>
<?php // FOR NEXT POST
$next_post = get_next_post();
$nid = $next_post->ID ;
/* This is an Example for a gallery-item in Elementor Custom CSS with Media Queries for different Elements */
/* Small devices (mobile/tablets, 767px and below) */
@media only screen and (max-width: 766px) {
selector .gallery-item img {
object-fit: cover;
height: 18.5em
}
}
@pboling
pboling / db_reset.server.ts
Last active March 7, 2026 13:30
Squash PostgreSQL Migrations with drizzle-kit and pgtools
// Author: |7eter l-|. l3oling
// License: MIT
// Copyright: 2024
// See: https://gist.github.com/pboling/f831235a1f3c5627f0341c4bbcf37ea9
// Inspired by https://gist.github.com/RavenHursT/1dd87fb3460183b02ed1cf1dba065de8
/*
Usage:
1. Add pre-requisites: