Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am matrixwd on github.
  • I am emurph78 (https://keybase.io/emurph78) on keybase.
  • I have a public key ASBdLHYWRWOUD11E4sT_mEiV6AQVPOu2A8O2LlZvlrnr0go

To claim this, I am signing this object:

/*
* This script helps identify what element is causing a horizontal scroll.
* Simply paste this into the console of Chrome, FF, etc...
* This was from CSS-Tricks back in 2014 but still works like a charm today
* https://css-tricks.com/findingfixing-unintended-body-overflow/
*/
var all = document.getElementsByTagName("*"), i = 0, rect, docWidth = document.documentElement.offsetWidth;
for (; i < all.length; i++) {
rect = all[i].getBoundingClientRect();
@matrixwd
matrixwd / style.css
Created December 22, 2019 02:16
Font Awesome CSS Circle Background
/*
As you know there is 2 ways to do this. One is stacked icons as described here: https://fontawesome.com/how-to-use/on-the-web/styling/stacking-icons
However this is a much simpler approach
Adjust the width, height, line-height, and padding to suite your needs
I used the i selector for general purposes but you can change it as well
*/
i {
background: #ffc0c0;
width: 100px;
height: 100px;
@matrixwd
matrixwd / footer.php
Created November 28, 2019 22:00
Adds Bootstrap CSS classes dynamically based on how many widgets in Wordpress Footer
@matrixwd
matrixwd / functions.php
Last active April 20, 2019 04:49
Extends the WP Statistics Plugin to show how many users are currently online.
<?php
/*
This gets added to your wordpress themes function.php or as a seperate plugin file
This function extends the WP Statistics Plugin to show how many users are currently online
And links it to the WP Statistics Page.
The css class is added for you to style according to your needs.
@matrixwd
matrixwd / index.php
Last active March 6, 2019 08:30
jQuery Search replacement of default search for Gravity Forms Directory, located https://wordpress.org/support/plugin/gravity-forms-addons/
<?php
/* This is just an example of code to place inside of your wordpress page when using Gravity Forms Directory
I also included some screenshots to show you.
This uses jQuery and javascript to search the table <td> elements with the attribute 'Business Name' <- Change this to yours
*/
?>
[button type="big"] Submit Your Business[/button]
<form>
@matrixwd
matrixwd / carousel.js
Created December 11, 2017 05:24 — forked from barryvdh/carousel.js
Bootstrap Carousel, with jQuery fallback for Internet Explorer (To have sliding images)
@matrixwd
matrixwd / functions.php
Last active October 8, 2017 19:36
Remove Heading tags from Wordpress WYSIWYG / Tinymce editor based on category
/*
This function does just what it says.
Input your category in the in_category()
Author: Eric Murphy
URL: https://www.matrixwebdesigners.com/
REF: https://codex.wordpress.org/Conditional_Tags#A_Category_Page
You can also use this for other things like pages, etc..
*/
@matrixwd
matrixwd / downloads.php
Created July 16, 2017 11:55
Adding Custom Fields Version Number to WooCommerce Downloads page
<?php break;
case 'download-product_version' :
$dl_id = $download['product_id'];
$version = esc_html( get_post_meta( $dl_id, 'version', true ) ); ?>
<span class="version"><?php echo $version; ?></span>
<?php break;
}