Skip to content

Instantly share code, notes, and snippets.

View turtlepod's full-sized avatar
🎧
Working from home

David Chandra Purnama turtlepod

🎧
Working from home
View GitHub Profile
@turtlepod
turtlepod / add-wpcli.sh
Created December 30, 2021 23:00 — forked from ladislavsulc/add-wpcli.sh
Add WP CLI to Laragon
cd C:\laragon\usr\bin && curl -L -O https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && echo @ECHO OFF > wp.bat && echo php "%~dp0wp-cli.phar" %* >> wp.bat
@turtlepod
turtlepod / functions.php
Last active August 24, 2017 02:23
Add a button to the main single hero actions in Listify. Add 'button-secondary' class to change the color to the accent color.
<?php
/**
* Plugin Name: Listify - Custom Single Listing Hero Button
*/
function custom_listify_single_job_listing_actions_after() {
global $post;
// Get URL.
$url = get_post_meta( $post->ID, 'your_custom_meta_key', true );
<?php
/**
* GitHub webhook handler template.
*
* @see https://developer.github.com/webhooks/
* @author Miloslav Hůla (https://github.com/milo)
*/
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check
@turtlepod
turtlepod / functions.php
Created August 20, 2016 05:12 — forked from tripflex/functions.php
Automatically set/assign parent taxonomy terms for hierarchical taxonomies in WordPress
<?php
add_action( 'set_object_terms', 'auto_set_parent_terms', 9999, 6 );
/**
* Automatically set/assign parent taxonomy terms to posts
*
* This function will automatically set parent taxonomy terms whenever terms are set on a post,
* with the option to configure specific post types, and/or taxonomies.
*
@turtlepod
turtlepod / unplugged-plugin.php
Created November 29, 2012 17:37 — forked from rachelbaker/unplugged-plugin.php
Load a different WordPress theme for mobile visitors
<?php
/*
Plugin Name: Unplugged Mobile Theme
Plugin URI: http://www.rachelbaker.me
Description: A plugin and theme for WordPress that automatically reformats your blog's content for optimized viewing on Apple's <a href="http://www.apple.com/unplugged/">unplugged</a> and <a href="http://www.apple.com/ipodtouch/">iPod touch</a>.
Author: Rachel Baker
Version: 0.1
Author URI: http://www.rachelbaker.me
# Special thanks to Imthiaz Rafiq and the wp-pda Plugin (http://imthi.com/wp-pda/) which this plugin is derived from.