Skip to content

Instantly share code, notes, and snippets.

View shaunmac's full-sized avatar
💭
I may be slow to respond.

Shaun MacDougall shaunmac

💭
I may be slow to respond.
View GitHub Profile
@shaunmac
shaunmac / function.php
Last active August 14, 2020 01:26
Getting Started with GatsbyJS Wordpress and Elementor
<?php
add_action('graphql_register_types', function () {
register_graphql_field('Post', 'elementorData', [
'type' => 'String',
'discription' => __('Elementor Data JSON', 'wp-graphql'),
'resolve' => function ($post) {
$data = get_post_meta($post->ID, '_elementor_data', true);
return !empty($data) ? $data : null;
}
@shaunmac
shaunmac / css-fixes.html
Last active July 14, 2020 00:22
Style fixes observed on https://inspired.edu.au/
<style>
/*
1. Mega menu needs to show all content.
*/
#masthead .header-wrapper.sticky #mega-menu-wrap-primary #mega-menu-primary>li.mega-menu-item>.mega-sub-menu {
overflow: scroll;
height: calc(100vh - 35px);
}
@shaunmac
shaunmac / styles.css
Created March 25, 2020 22:51
Override Style for interrfelectionsmovie.com
/*
To: Mr Peter Joseph
This is in response to your tweet:
https://twitter.com/search?q=%23interreflections&src=hashtag_click
Please consider:
It took me a few hours to put this together, however, the time I've spent learning how to do this has accumulated.
I'm counting over 10 years now.
@shaunmac
shaunmac / wpgis.front.js
Last active March 11, 2020 01:22
wpgis gallery fix
jQuery(document).ready(function($)
{
if(jQuery('.wpgis-slider-for').length > 0)
{
if(object_name.wpgis_arrowdisable == 1){
var slider_arrow = false;
}else{
var slider_arrow = true;
@shaunmac
shaunmac / package.json
Last active January 19, 2018 03:07
Webpack KSS Styleguid from SASS
{
"name": "webpack-kss",
"version": "1.0.0",
"description": "webpack build for KSS Styleguids",
"main": "index.js",
"dependencies": {
"bootstrap": "^3.3.7",
"bootstrap-datepicker": "^1.7.1",
"breakpoint-sass": "^2.7.1",
"copy-webpack-plugin": "^4.2.1",