Skip to content

Instantly share code, notes, and snippets.

@peterbinks
peterbinks / build-deploy.yml
Created November 27, 2025 21:03
Desploy Static Site to NearlyFreeSpeech Hosting
name: NFSN Deploy
on:
push:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
// Add to function.php
function taxo_primary_term_name($taxo){
$wpseo_primary_term = new WPSEO_Primary_Term($taxo, get_the_ID());
$wpseo_primary_term = $wpseo_primary_term->get_primary_term();
$cat = get_the_category();
if ( $wpseo_primary_term ) { // Return yoast primary category
return $wpseo_primary_term = get_term($wpseo_primary_term)->name;
}
// Grab our gulp packages
var gulp = require('gulp'),
autoprefixer = require('autoprefixer'),
gulpLoadPlugins = require('gulp-load-plugins'),
yargs = require('yargs'),
browserSync = require('browser-sync').create();
const $ = gulpLoadPlugins();
const wpPath = "./wp-content/themes/*YOURTHEME*";
const PRODUCTION = !!(yargs.argv.production);
<?php
global $post;
$get_posts = tribe_get_events(array('posts_per_page'=>-3,) );
foreach($get_posts as $post) { setup_postdata($post);
?>
<?php if ( has_post_thumbnail() ) { ?>