Skip to content

Instantly share code, notes, and snippets.

Amy Haywood Dutton ahaywood

View GitHub Profile
@ahaywood
ahaywood / hyper.js
Created Jun 14, 2020
Hyper Configuration
View hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: "stable",
@ahaywood
ahaywood / .gitignore
Created Jun 1, 2020
.gitignore template (generated by Create React App)
View .gitignore
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
View pull_request_template.md

Clubhouse: #ADD LINK TO CLUBHOUSE STORY

Feature description

Clearly and concisely describe the feature.

Analysis and Design

Analyze and attach design documentation.

@ahaywood
ahaywood / functions.php
Created Mar 5, 2019
WP - Remove Gutenberg Editor
View functions.php
/**
* REMOVE GUTENBERG EDITOR
* Reference: https://kinsta.com/blog/disable-gutenberg-wordpress-editor/
*/
add_filter('use_block_editor_for_post', '__return_false');
@ahaywood
ahaywood / image-and-video.php
Created Nov 9, 2018
Display Image and Video
View image-and-video.php
<div class="fitvids">
<?php $video = get_field('testimonial_video');
$image = get_field('testimonial_image'); ?>
<?php if ($image && $video) { // image click to video ?>
<a href="#" class="js-video">
<img src="<?php echo $image; ?>" data-video="<?php echo $video; ?>">
</a>
<?php } else if ($video) { // video only ?>
@ahaywood
ahaywood / README.md
Last active Nov 7, 2018
JS: Scroll to Top
View README.md

Requirements

Make sure you're including jQuery within the project.

Quick Use

The link that you want the user to click, trigger the scroll, needs to have a class of js-scroll-to-top:

<a href="#" class="js-scroll-to-top">Back to Top</a>

At the top of your page, right after the body tag, include an empty div with an ID of top:

@ahaywood
ahaywood / comments.php
Created Nov 9, 2017
PHP - WP: Ah Ha Comments
View comments.php
<?php wp_list_comments(array(
'avatar_size' => '140',
'type' => 'comment',
'callback' => 'ahha_comments'
)); ?>
@ahaywood
ahaywood / page.php
Created Nov 7, 2017
WP: Three ways to display an image
View page.php
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php // ACF
$image = get_field('extra_image');
var_dump($image);
?>
<img src="<?= $image['url']; ?>" alt="<?= $image['alt']; ?>">
<?php // FEATURED IMAGE >> IMAGE TAG
View html-share-buttons.html
<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
<!-- Buffer -->
<a href="https://bufferapp.com/add?url=https://simplesharebuttons.com&amp;text=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/buffer.png" alt="Buffer" />
</a>
<!-- Digg -->
<a href="http://www.digg.com/submit?url=https://simplesharebuttons.com" target="_blank">
View .gitmodules
[submodule "wp"]
path = wp
url = git://github.com/WordPress/WordPress.git
[submodule "ahha_plugin_acf"]
path = wp-content/plugins/ahha_plugin_acf
url = git@bitbucket.org:ahhacreative/ahha_plugin_acf.git
[submodule "ahha_plugin_wpdbmigratepro"]
path = wp-content/plugins/ahha_plugin_wpdbmigratepro
You can’t perform that action at this time.