Skip to content

Instantly share code, notes, and snippets.

@dabrattoli
dabrattoli / content-review-list.php
Created February 28, 2017 06:49
Developer Workshop - Create Your Own Movie Review Website - Content Templates with Meta box field calls
<?php
/**
* Template part for displaying posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
@dabrattoli
dabrattoli / archive-movie_reviews.php
Created February 28, 2017 06:31
Developer Workshop - Create Your Own Movie Review Website - Archive Template Files
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
@dabrattoli
dabrattoli / single-movie_reviews.php
Created February 28, 2017 06:05
Developer Workshop - Create Your Own Movie Review Website - single-movie_reviews.php
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
@dabrattoli
dabrattoli / single.php
Created February 28, 2017 05:26
Developer Workshop - Create Your Own Movie Review Website - Twenty Seventeen Original Single.php
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since 1.0
* @version 1.0
vagrant plugin install vagrant-hostsupdater
vagrant plugin install vagrant-triggers
vagrant plugin install vagrant-vbguest
@dabrattoli
dabrattoli / Event-widget.php
Last active September 3, 2016 21:49
WordPress Event widget Angular App
<?php
// Call Fetch Code
//require_once( plugin_dir_path( __FILE__ ).'php/event-rest-api-fetch.php' );
/** Widget Code */
class LCCC_Feed_Widget extends WP_Widget {
/**
* Sets up the widget's name and attributes
@dabrattoli
dabrattoli / Child_Theme_Functions.php
Created June 12, 2016 15:40
WordCamp NEO 2016 Custom Responsive Theme Workshop Code Samples
/* The file in your theme directory will be titled Functions.php .*/
/* I named the file above so that you would understand what the file is and where it goes */
/* In this case you will be adding this code to Functions.php file in you child theme */
function child_wcneo_foundation_scripts() {
/* Add Parent Theme Styles */
wp_enqueue_style( 'demo-framework-style', get_template_directory_uri() .'/style.css' );
/* ----- Add Foundation Support From Parent Theme ----- */
/* Add Foundation CSS */
wp_enqueue_style( 'foundation-app', get_template_directory_uri() . '/foundation/css/app.css' );
@dabrattoli
dabrattoli / foundation.js
Created June 11, 2016 14:56
WCNEO Custom Responsive Theme Workshop Samples
jQuery(document).ready(function($) { $(document).foundation();});
var project = 'wptesttheme', // Project name, used for build zip.
sitedirectory = 'wordpress-default',
scssfolder = './'+ sitedirectory + '/wp-content/themes/' + project + '/SCSS',
workingdir = './'+ sitedirectory + '/wp-content/themes/' + project + '/',
cssdir = './'+ sitedirectory + '/wp-content/themes/' + project + '/css/',
buildir = './'+ sitedirectory + '/wp-content/themes/' + project + '_build/',
url = 'lccc.dev', // Local Development URL for BrowserSync. Change as-needed.
gulp = require('gulp'),
browserSync = require('browser-sync'), // Asynchronous browser loading on .scss file changes
reload = browserSync.reload,
var project = 'slilccc', // Project name, used for build zip.
scssfolder = './wp-content/themes/' + project + '/SCSS',
workingdir = './wp-content/themes/' + project + '/',
cssdir = './wp-content/themes/' + project + '/css/',
buildir = './wp-content/themes/' + project + '_build/',
url = 'lccc.dev', // Local Development URL for BrowserSync. Change as-needed.
gulp = require('gulp'),
browserSync = require('browser-sync'), // Asynchronous browser loading on .scss file changes
reload = browserSync.reload,
autoprefixer = require('gulp-autoprefixer'), // Autoprefixing magic