This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add all the elements inside modal which you want to make focusable | |
const focusableElements = | |
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'; | |
const modal = document.querySelector('#exampleModal'); // select the modal by it's id | |
const firstFocusableElement = modal.querySelectorAll(focusableElements)[0]; // get first element to be focused inside modal | |
const focusableContent = modal.querySelectorAll(focusableElements); | |
const lastFocusableElement = focusableContent[focusableContent.length - 1]; // get last element to be focused inside modal | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: AMP Story Supports Landscape | |
* | |
* @package AMP_Story_Supports_Landscape | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2019 Google Inc. | |
* | |
* @wordpress-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function ($) { | |
'use strict'; | |
// Smooth scroll | |
// https://css-tricks.com/snippets/jquery/smooth-scrolling/ | |
// Select all links with hashes | |
$('a[href*="#"]') | |
// Remove links that don't actually link to anything | |
.not('[href="#"]') | |
.not('[href="#0"]') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: wordpress assist clean header | |
Plugin URI: http://www.wordpressassist.nl/ | |
Description: Remove shortlink hook | |
Version: 1.0 | |
Author: AukeJomm | |
Author URI: http://www.aukejongbloed.nl | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //<~ Remove me | |
//Removes Title and Description on CPT Archive | |
remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' ); | |
//Removes Title and Description on Blog Archive | |
remove_action( 'genesis_before_loop', 'genesis_do_posts_page_heading' ); | |
//Removes Title and Description on Date Archive | |
remove_action( 'genesis_before_loop', 'genesis_do_date_archive_title' ); | |
//Removes Title and Description on Archive, Taxonomy, Category, Tag | |
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // <~ keep me in | |
add_action('genesis_entry_content','themeprefix_team_slider' ); | |
//Fields | |
//team_portfolio = Gallery Field | |
function themeprefix_team_slider() { | |
$images = get_field('team_portfolio');//add your correct filed name | |
if( $images ): ?> | |
<div class="team-items"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function ak_convert_hex2rgba($color, $opacity = false) { | |
$default = 'rgb(0,0,0)'; | |
if (empty($color)) | |
return $default; | |
if ($color[0] == '#') | |
$color = substr($color, 1); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Enqueue sticky menu script | |
add_action( 'wp_enqueue_scripts', 'sp_enqueue_script' ); | |
function sp_enqueue_script() { | |
wp_enqueue_script( 'sample-sticky-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/sticky-menu.js', array( 'jquery' ), '1.0.0' ); | |
} | |
//* Reposition the secondary navigation menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Pagination for a parent page and their child pages. | |
* Use as gp130428_link_pages() in your template file. | |
* Optionally limit to a particular parent page by passing its ID (i.e. 123) to the function: gp130428_link_pages( 123 ) | |
* | |
*/ | |
function gp130428_paginate_parent_children( $parent = null ) { | |
global $post; | |
NewerOlder