Skip to content

Instantly share code, notes, and snippets.

View badabingbreda's full-sized avatar

Didou Schol badabingbreda

  • Breda, Netherlands
View GitHub Profile
@kingkool68
kingkool68 / all-post-type-archives.php
Created June 2, 2023 14:49
Adds /all/ URL after a post type archive to be able to show all items for that archive.
<?php
/**
* Plugin Name: Show All Post Type Archives
* Description: Add support for /all/ after a post type archive
* Version: 0.0.1
* Plugin URI: https://gist.github.com/kingkool68/efa01ecff91bc722cd3f667ae509a37b
* Author: Russell Heimlich
* Author URI: https://github.com/kingkool68
*/
class RH_Show_All_Archives {
@cartpauj
cartpauj / add-member-and-transaction-one-request-php-curl-memberpress.php
Created September 11, 2019 19:17
How to add a Member and Transaction and Send a Welcome Email to the Member with MemberPress Developer Tools API
<?php
$url = 'http://testsite.w6.wpsandbox.pro/wp-json/mp/v1/members';
$ch = curl_init($url);
$data_string = json_encode(
[
'email' => '[email protected]',
'username' => '[email protected]',
'first_name' => 'test',
@fiskhandlarn
fiskhandlarn / custom-search-acf-wordpress.php
Last active April 17, 2024 06:52 — forked from jserrao/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request. I updated this original script with better documentation and XSS / SQL injection support.
<?php
/*
##############################
########### Search ###########
##############################
Included are steps to help make this script easier for other to follow
All you have to do is add custom ACF post types into Step 1 and custom taxonomies into Step 10
I also updated this work to include XSS and SQL injection projection
[list_searcheable_acf list all the custom fields we want to include in our search query]
@lonchbox
lonchbox / gist:999616a3586f2817af71
Created March 10, 2016 20:51
WPML custom language switcher
<?php
/*
* WPML language switcher customizations: htp://wpml.org
*/
function custom_wpml_lang_switcher() {
if (function_exists('icl_get_languages')){
// remove WPML default css
define('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS', true);
// Custom language layout selector ?>
@spivurno
spivurno / gw-gravity-forms-datepicker-kayak-style.css
Last active June 26, 2020 07:04
Gravity Wiz // Gravity Forms // Kayak-style Datepicker
/**
* Gravity Wiz // Gravity Forms // Kayak-style Datepicker
* Style your Gravity Forms Datepickers like Kayak.com
*/
.datepicker-clean.ui-datepicker {
background-color: #fff;
width: 516px !important;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1) !important;
padding-left: 20px;
position: relative;
@TomByrne
TomByrne / MultiExporter.jsx
Last active November 14, 2024 16:35
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
// Comments or suggestions to [email protected]
@yckart
yckart / jquery.addrule.js
Last active December 29, 2022 12:16
Add css-rules to an existing stylesheet - http://stackoverflow.com/a/16507264/1250044
/*!
* jquery.addrule.js 0.0.2 - https://gist.github.com/yckart/5563717/
* Add css-rules to an existing stylesheet.
*
* @see http://stackoverflow.com/a/16507264/1250044
*
* Copyright (c) 2013 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/11/23
**/