Skip to content

Instantly share code, notes, and snippets.

View askwpgirl's full-sized avatar

Angela Bowman askwpgirl

View GitHub Profile
@askwpgirl
askwpgirl / style.css
Last active November 12, 2025 17:05
LearnDash Style Fixes
.ld-status-icon.ld-status-in-progress {
border-color: #324A6D #e2e7ed #e2e7ed #324A6D !important;
}
.learndash-wrapper .ld-status-complete {
background-color: #324A6D; /* Use your own color here */
color: #fff;
}
.learndash-wrapper .ld-progress .ld-progress-bar .ld-progress-bar-percentage {
background: #324A6D; /* Use your own color here */
@askwpgirl
askwpgirl / style.css
Created September 29, 2025 18:07
Gutenberg Editor Button Style
/* Block Editor button styling */
a.wp-block-button__link:not(.has-background) {
color: #000 !important;
background-color: #93D500;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
}
@askwpgirl
askwpgirl / functions.php
Created September 12, 2025 02:20
Register Widget Areas
// Add to Code Snippets plugin > New Snippet and Run Everywhere
// Register Footer Widget Areas
function mytheme_register_footer_widgets() {
// Footer 1
register_sidebar( array(
'name' => __( 'Footer 1', 'mytheme' ),
'id' => 'footer-1',
'description' => __( 'Widgets in this area will be shown in Footer 1.', 'mytheme' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
@askwpgirl
askwpgirl / custom.css
Created July 10, 2025 17:49
Respect Motion Preferences for Elementor Animated Headline
/* Use the selector below to hide the animated headline highlight */
@media (prefers-reduced-motion: reduce) {
.elementor-headline--style-highlight svg {
display: none !important;
}
}
/* Use the selectors below to hide the rotating headline and use a different headline */
@askwpgirl
askwpgirl / custom.js
Created May 7, 2025 22:50
Add aria-current="page" for Elementor mega menu subitems
<script>document.addEventListener('DOMContentLoaded', function () {
const currentUrl = window.location.origin + window.location.pathname;
const links = document.querySelectorAll('a[href]');
links.forEach(link => {
const linkUrl = new URL(link.href);
const normalizedLink = linkUrl.origin + linkUrl.pathname;
if (normalizedLink === currentUrl) {
link.setAttribute('aria-current', 'page');
@askwpgirl
askwpgirl / functions.php
Last active May 6, 2025 23:37
Hide License Renewal Notice in Elementor
<?php
// copy the following code in to Code Snippets plugin and set to only run in Adminstration area.
// do not copy this text or anything above it.
/**
* Remove annoying Elementor license notice
*/
add_action("admin_enqueue_scripts", function() {
?>
@askwpgirl
askwpgirl / custom.js
Created April 11, 2025 22:14
Flipbox script for click custom flipbox in Elementor
<script>
(function($) {
function setupFlipBoxes($scope) {
$scope.find('.custom-flip-box').each(function () {
const $flipBox = $(this);
$flipBox.off('click').on('click', function () {
$flipBox.toggleClass('flipped');
});
});
}
@askwpgirl
askwpgirl / custom.css
Last active November 13, 2025 19:16
CSS for Elementor to Respect Reduced Motion
/* This is a CSS media query for accessibility-aware
** browsers respects reduced motion setting in operating systems */
@media (prefers-reduced-motion: reduce) {
.elementor-element.animated {
transform: none !important;
animation: none !important;
}
@askwpgirl
askwpgirl / style.css
Last active April 8, 2025 21:24
Elementor Accessibile Hyperlinks and Hover State
/* Add this CSS to your Custom CSS in Site Settings
** or custom.css */
/* Underline hyperlinks in text widgets */
.elementor-widget-text-editor a {
text-decoration: underline;
}
.elementor-widget-text-editor a:hover {
@askwpgirl
askwpgirl / pause-sliders.js
Created April 8, 2025 19:44
Add Pause Button to Elementor Carousels
//Add this to Header/Footer plugin in the HTML <head>
<script>
document.addEventListener('DOMContentLoaded', function () {
const seen = new WeakSet();
const interval = setInterval(() => {
const swiperEls = document.querySelectorAll('.swiper.swiper-initialized');
swiperEls.forEach((swiperEl, index) => {
if (seen.has(swiperEl)) return;