Skip to content

Instantly share code, notes, and snippets.

@andBrandCo
andBrandCo / WP_Query_Args.php
Created March 18, 2024 23:14 — forked from fazlurr/WP_Query_Args.php
WP_Query arguments list
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@andBrandCo
andBrandCo / filters.php
Created February 17, 2024 22:15 — forked from dkjensen/filters.php
WordPress Gutenberg Query Loop View More AJAX
<?php
/**
* Add data attributes to the query block to describe the block query.
*
* @param string $block_content Default query content.
* @param array $block Parsed block.
* @return string
*/
function query_render_block( $block_content, $block ) {
global $wp_query;
@andBrandCo
andBrandCo / author-plugin.php
Created February 17, 2024 21:39 — forked from carlodaniele/author-plugin.php
An example Gutenberg dynamic block
<?php
/**
* Plugin Name: An example block for Kinsta readers
* Description: Businessperson
* Requires at least: 5.8
* Requires PHP: 7.0
* Version: 0.1.0
* Author: Carlo
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
@andBrandCo
andBrandCo / ssh_server_commands.md
Created December 4, 2023 15:02 — forked from stevekm/ssh_server_commands.md
handy ssh, rsync, scp commands

Here are some handy commands for connecting to servers and copying files about. These are all for Linux terminal / bash shell

Do cool things with ssh; log in & run command, find files in dir

# log into server
ssh [email protected] -Y 
# -X      Enables X11 forwarding. <- use this to enable X11 graphical windows, but this will eventually time out & you'll lose the X11 connection
# -Y      Enables trusted X11 forwarding. <- this one preserves your X11 connection while you're logged in