Skip to content

Instantly share code, notes, and snippets.

@vxnick
vxnick / gist:380904
Created April 27, 2010 15:52
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
@chadothompson
chadothompson / wordpress-csv-export.php
Created July 24, 2013 14:33
Exporting WordPress post types, titles and URLs in a CSV format.
<?php
/*
export.php - a script for outputting post type, title and URL in CSV format.
All commas are also stripped from titles in order to keep the CSV format (for HootSuite import) versus keeping the titles as is.
*/
include "wp-load.php";
$posts = new WP_Query('post_type=any&posts_per_page=-1&post_status=publish');
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@hissy
hissy / gist:ebb1d317f9abc190b901
Last active January 7, 2023 08:43
[Really Simple CSV Importer] Import ACF Google Map Field https://wordpress.org/support/topic/import-acf-google-map-field
"post_title","post_type","lat","lng"
"Map","post",35.710115,139.810203
@mt-deva
mt-deva / readme.md
Last active December 19, 2017 06:11 — forked from chrisvanpatten/readme.md
Super-simple way to grab a few Instagram images and cache them w/ WordPress

This is an easy way to integrate a basic Instagram feed into a WordPress site.