Skip to content

Instantly share code, notes, and snippets.

View cconversion's full-sized avatar
🏠
Busy

cconversion

🏠
Busy
  • Earth
View GitHub Profile
@bekarice
bekarice / yoast-seo-with-coauthors-plus.php
Created April 19, 2018 19:01
Forces Yoast to use the display name directly for the queried object so the proper coauthor name is used as the page title.
<?php // only copy if needed!
/**
* Fixes page titles for co-author archives.
*
* @param string[] $replacement Yoast title settings replacement data
* @return string[] updated data
*/
function br_fix_author_archive_title( $replacement ) {
@zackkatz
zackkatz / gravityview-trigger-gform_after_submission.php
Created June 19, 2017 19:09
GravityView - Trigger the `gform_after_submission` action when an entry is edited. This adds support for the Gravity Forms Zapier addon, for example.
<?php
/**
* GravityView doesn't trigger the `gform_after_submission` action when editing entries. This does that.
*
* @param array $form
* @param int $entry_id ID of the entry being updated
* @param GravityView_Edit_Entry_Render $object
*
* @return void
@GaryJones
GaryJones / js.js
Created January 5, 2015 12:54
Gravity Forms Countries dropdown with country codes
var countryCodes = {
'Afghanistan': '93',
'Albania': '355',
'Algeria': '213',
'American Samoa': '684',
'Andorra': '376',
'Angola': '244',
'Antigua and Barbuda': '1-268',
'Argentina': '54',
'Armenia': '374',
@bekarice
bekarice / edit-woocommerce-checkout-template.php
Last active March 27, 2023 23:12
Add content and notices to the WooCommerce checkout - sample code
/**
* Each of these samples can be used - note that you should pick one rather than add them all.
*
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/
**/
/**
* Add a content block after all notices, such as the login and coupon notices.
*
@woogist
woogist / wc-measurement-price-calculator-convert.php
Last active April 28, 2019 17:53
WooCommerce Measurement Price Calculator custom unit convert
<?php
add_filter( 'wc_measurement_price_calculator_conversion_table', 'wc_measurement_price_calculator_conversion_table' );
/**
* This converts standard units to all other compatible units
*/
function wc_measurement_price_calculator_conversion_table( $conversion_table ) {
// 1 ft = 1/18228.3465 leagues
@corsonr
corsonr / GitHub Gist WP Shortcodes Plugin
Created June 2, 2012 09:03
How to use GitHub Gist within Wordpress Shortcodes
<?php
/*
Plugin Name: Easy GitHub Gist Shortcodes
Plugin URI: http://www.remicorson.com/easy-github-gist-shortcodes
Description: Insert easily GitHub Gist within shortcodes this way [gist id="xxxxxx"]
Version: 1.0
Author: Remi Corson
Author URI: http://www.remicorson.com/
*/