Skip to content

Instantly share code, notes, and snippets.

@neilgee
neilgee / woo-endpoint-custom.php
Last active January 3, 2026 10:19
WooCommerce Endpoint Order and Rename - My Account Page v2.6+
<?php
/*
Plugin Name: WooCustom My Account
Plugin URI: http://wpbeaches.com/
Description: WooCustom - add a custom area in my-account
Author: Neil Gee
Version: 1.0.0
Author URI: http://wpbeaches.com
License: GPL-2.0+
@neilgee
neilgee / git.css
Last active July 22, 2025 08:36
Git Command Line Reference - Notes, Cheatsheet and reminders on Git set up and commands
/*
* Set up your Git configuration
*/
git config --global user.email "you@yourdomain.com"
git config --global user.name "Your Name"
git config --global core.editor "nano"
@neilgee
neilgee / functions.php
Last active July 3, 2025 08:44
Cloudflare Turnstilefor WordPress Comments form
<?php <~~ don't add me in
/*
* Adding Cloudflare Turnstile to WordPress Comment
* https://redpishi.com/wordpress-tutorials/cloudflare-turnstile-captcha-wordpress/
*/
function cloudflare_key(){
@neilgee
neilgee / microdata-cpt.php
Created February 4, 2015 07:35
Genesis Microdata Example - Changing a CPT SChema
add_action( 'get_header', 'themeprefix_cpt_microdata' );
//Change microdata for events custom post type
function themeprefix_cpt_microdata() {
if ('event' == get_post_type()) {//change to your cpt
//add in the microdata changes
add_filter( 'genesis_attr_entry', 'themeprefix_genesis_attributes_entry', 20 );
@neilgee
neilgee / carousel-label-pp.js
Last active June 25, 2025 04:52
Beaver Builder - PowePack Testimonial Carousel change pagination labels
@neilgee
neilgee / maldet-custom.sh
Last active May 5, 2025 07:23
Maldet Alternate Cron
#!/bin/bash
# Paths to scan
SCAN_PATHS=(
"/home/?/webapps/?"
)
# Days of modification to scan
SCAN_DAYS=1
@neilgee
neilgee / bricks_turnstile.php
Last active May 3, 2025 23:09
Integrating Cloudflare Turnstile to Bricks Comments
<?php <--// remove
// Cloudflare Keys
function cloudflare_key() {
$sitekey = "XXXXXXXXXX";
$secretkey = "XXXXXXXXXX";
return [$sitekey, $secretkey];
}
// Use Turnstile for comments, load only on single posts
@neilgee
neilgee / woologin.php
Last active December 16, 2024 16:27
Add WooCommerce MyAccount Login/Logout Menu Items to Registered Menu
<?php //<~ don't add me in
add_filter( 'wp_nav_menu_items', 'my_account_loginout_link', 10, 2 );
/**
* Add WooCommerce My Account Login/Logout to Registered Menu
*
* @link https://support.woothemes.com/hc/en-us/articles/203106357-Add-Login-Logout-Links-To-The-Custom-Primary-Menu-Area
*/
function my_account_loginout_link( $items, $args ) {
if (is_user_logged_in() && $args->theme_location == 'primary') { //change your theme registered menu name to suit
@neilgee
neilgee / style.css
Last active October 30, 2024 04:29
CSS Teaks for WP Google Review Slider
/* Google Review Sider & Grid
--------------------------------------------- */
/* Google Review Plugin Swap #000000 and #ffb200 for your colors */
@media(min-width:768px) {
/* Testimonials Equal Height*/
.wprevpro_t1_outer_div {
display: flex;
@neilgee
neilgee / array-cascade.php
Last active October 8, 2024 22:20
Beaver Builder Global Settings Filter
<?php //<~ don't add me in
add_filter( 'fl_builder_register_settings_form', 'wb_builder_register_settings_form_short', 10, 2 );
/**
* Filter the Global Settings Options.
* Media breakpoints and form title have been changed.
*/
function wb_builder_register_settings_form_short( $form, $id ) {
if ( 'global' == $id ) {