Skip to content

Instantly share code, notes, and snippets.

View jessedmatlock's full-sized avatar
🏠
Working from home

Jesse Matlock jessedmatlock

🏠
Working from home
View GitHub Profile
ul.breadcrumbs li :after{
content:" ";
display:block;
width:1.45em;
height:1.45em;
border-top:1px solid rgba(0, 0, 0, 0.05);
border-right:1px solid rgba(0, 0, 0, 0.25);
-webkit-transform:rotate(45deg);
-moz-transform:rotate(45deg);
transform:rotate(45deg);
//
-> class.phpmailer.php
-> example.php
-> thank-you.php
/**
* jQuery alterClass plugin
*
* Remove element classes with wildcard matching. Optionally add classes:
* $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' )
*
* Copyright (c) 2011 Pete Boere (the-echoplex.net)
* Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php
*
*/
/*
* From css-tricks.com
* http://css-tricks.com/snippets/css/media-queries-for-standard-devices/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
@jessedmatlock
jessedmatlock / wp-query.php
Created March 12, 2021 02:34 — forked from hslaszlo/wp-query.php
Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title.
<?php
$term = get_queried_object();
the_post();
$wp_query = new WP_Query( array(
'post_type' => 'resource',
'tax_query' => array(
array(
'taxonomy' => 'resource_types',
'field' => 'slug',
'terms' => $term->name,
@jessedmatlock
jessedmatlock / acf-tsf-integration.php
Created March 17, 2021 14:24 — forked from doubleedesign/acf-tsf-integration.php
Get meta descriptions in The SEO Framework from ACF flexible content fields
<?php
/**
* The SEO Framework + ACF flexible content integration
* TSF will look at the excerpt and then the content to generate the default meta description.
* If both of those are empty, this code looks for ACF flexible modules to get it from.
* // TODO: Make this work with archives as well as posts
* @param $description
* @param $args
*
* @return mixed|string
@jessedmatlock
jessedmatlock / wp_breadcrumbs.php
Created March 19, 2021 17:24 — forked from alex-wdmg/wp_breadcrumbs.php
A custom WordPress nav walker class to implement the Bootstrap 4 breadcrumbs style in a custom theme using the WordPress.
<?php
/**
* WP Bootstrap Breadcrumbs
*
* @package WP-Bootstrap-Breadcrumbs
*
* Description: A custom WordPress nav walker class to implement the Bootstrap 4 breadcrumbs style in a custom theme using the WordPress.
* Author: Dimox - @Dimox, Alexsander Vyshnyvetskyy - @alex-wdmg
* Version: 1.1.0
* Author URI: https://github.com/Dimox
@jessedmatlock
jessedmatlock / breadcrumbs-functions.php
Created March 19, 2021 17:24 — forked from tinotriste/breadcrumbs-functions.php
Wordpress: Breadcrumbs function
<?php
/*=============================================
= BREADCRUMBS =
=============================================*/
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
@jessedmatlock
jessedmatlock / Gravity Forms + Bootstrap 4
Created March 22, 2021 17:46 — forked from brianpurkiss/Gravity Forms + Bootstrap 4
Helpful function for adding Bootstrap 4 classes to Gravity Forms fields.
<?php
/**
* Gravity Forms Bootstrap Styles
*
* Applies bootstrap classes to various common field types.
* Requires Bootstrap to be in use by the theme.
*
* Using this function allows use of Gravity Forms default CSS
* in conjuction with Bootstrap (benefit for fields types such as Address).
*
@jessedmatlock
jessedmatlock / acf-pagination.php
Created March 26, 2021 13:07 — forked from icetee/acf-pagination.php
ACF Repeater Field Pagination
<?php
/*
* Paginate Advanced Custom Field repeater
*/
if( get_query_var('page') ) {
$page = get_query_var( 'page' );
} else {
$page = 1;
}