Skip to content

Instantly share code, notes, and snippets.

View nateluzod's full-sized avatar
🎯
Focusing

Nate Luzod nateluzod

🎯
Focusing
View GitHub Profile
@nateluzod
nateluzod / csv_to_wp_posts.php
Last active April 13, 2019 19:08
Create posts from a CSV in WordPress.
<?php
/**
* Run w/in same directory as CSV
*/
$file = fopen( dirname( __FILE__ ) . "/filename.csv", "r" );
while( !feof( $file )){
$line = fgetcsv( $file );
@nateluzod
nateluzod / get-content-by-term.php
Created April 21, 2021 01:51
Timber/Twig Filter - get content by term
<?php
/**
* Get content by taxonomy
* Sorts in reverse-cron
* @param category {integer} the ID of the term we're pulling from
* @param postType {string, array} the post type(s) we're drawing from
* @param numberPosts {integer} the number of posts we'd like back
*/
@nateluzod
nateluzod / lor-data-colors
Created December 1, 2022 05:57
LOR Data Colors
{
"neutral" : [
{
"gray" : {
"dark" : "#2F3634",
"light" : "#868688"
}
}
],
"data" : [