A Pen by Ryan Niswonger on CodePen.
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
<!-- From https://www.tpgi.com/subheadings-subtitles-alternative-titles-and-taglines-in-html/ --> | |
<hgroup role="group" aria-roledescription="Heading group"> | |
<p aria-roledescription="subtitle">Subtitle 1</p> | |
<h1>Title</h1> | |
<p aria-roledescription="subtitle">Subtitle 2</p> | |
</hgroup> |
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_action( 'after_setup_theme', function() { | |
// remove admin bar margin | |
add_theme_support( 'admin-bar', array( 'callback' => '__return_false' ) ); | |
} ); |
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
/** | |
* Restrict Customizer menu search to titles | |
* Based on: https://stackoverflow.com/questions/54155517/how-to-limit-wp-admin-to-search-only-titles | |
* Added Customizer screen detection | |
*/ | |
add_filter( | |
'posts_search', | |
function( $search, $wp_query ) { | |
global $wp_customize; | |
global $wpdb; |
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 | |
// encode email link with rot13 | |
$encoded_email_link = str_rot13( 'mailto:' . strtolower( $email_address ) ); | |
?> | |
<script> | |
// decode rot13-encoded text | |
decodeText = text => { | |
return text.replace(/[a-z]/gi, letter => { | |
return String.fromCharCode( |
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
/** | |
* Change admin color scheme for specific users based on the environment type. Overrides user selection. | |
* Color scheme options: fresh, light, modern, blue, midnight, sunrise, ectoplasm, ocean, coffee | |
*/ | |
add_filter( | |
'admin_init', | |
function () { | |
$user_ids = array( 1 ); // Array of user IDs | |
$current_user_id = get_current_user_id(); |
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
javascript: (() => { let style = document.createElement("style"); style.innerHTML = ` .a3s table { width: 90% !important; } .a3s img { max-width: 90% !important; height: auto !important; } tr:has(.ast) { display: none !important; } `; document.head.appendChild(style);})(); |
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
/** | |
* Gravity Forms: Filters the submit button. | |
* Replaces the <input> button with a <button> while maintaining attributes from original <input>. | |
* | |
* @param string $button Contains the <input> tag to be filtered. | |
* @param object $form Contains all the properties of the current form. | |
* | |
* @return string The filtered button. | |
* | |
* GF provides sample code for doing this under Examples at the following link but this dodn't work in my environment. |
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 this code to the Avada Custom CSS. | |
Add the class "equal-height" to your Content Boxes Options container, not a single Content Box. | |
The editor preview will not show the change but reload the live page to see the results. | |
*/ | |
.fusion-content-boxes.equal-height { | |
display: flex; | |
align-items: stretch; | |
flex-wrap: wrap; |
A Pen by Ryan Niswonger on CodePen.
NewerOlder