Skip to content

Instantly share code, notes, and snippets.

@stilografico
stilografico / custom-post-taxonomy-permalinks.php
Created June 19, 2019 07:31 — forked from kasparsd/custom-post-taxonomy-permalinks.php
Create permalink structure URLs for custom post types that include all parent terms from a custom taxonomy
<?php
/*
Term Archive Pages:
- http://example.com/recipes/dinner/
- http://example.com/recipes/breakfast,brunch/
Single Recipe Pages:
- http://example.com/recipes/dinner/soup-title/
Global setup
git config --global user.name "Andrea"
git config --global user.email "[email protected]"
Create a new repository
git clone [email protected]:stilografico/test2.git
cd test2
@stilografico
stilografico / gist:ab61371f0623653fea9224dc849fe4c3
Created March 26, 2018 09:15
GRAVITY FORMS CLEANUP Delete orphan entries from rg_lead_detail_long
/*GRAVITY FORMS CLEANUP*/
Delete orphan entries from rg_lead_detail_long
SELECT * FROM wp_rg_lead_detail_long
LEFT JOIN wp_rg_lead_detail ON (wp_rg_lead_detail_long.lead_detail_id = wp_rg_lead_detail.lead_id)
WHERE (wp_rg_lead_detail.lead_id IS NULL)
DELETE wp_rg_lead_detail_long FROM wp_rg_lead_detail_long
LEFT JOIN wp_rg_lead_detail ON (wp_rg_lead_detail_long.lead_detail_id = wp_rg_lead_detail.lead_id)