Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew AndrewSepic

View GitHub Profile
View push-ignore
# This file lists which files should not be pushed by WPE DevKit. Feel free to
# add, remove, or comment lines to change the sync behavior, but note that this
# file will be recreated with the default values if it is missing. There are a
# few additional files, including wp-config.php, which are ignored no matter
# what as synchronizing these files would almost certainly result in an unusable
# install.
# Temporary and OS files
*~
.DS_Store
View ACF-Filters.php
// Create Filters ?>
<div id="vod-filters">
<h2>Filters <span class="arrow down-default"></span></h2>
<div class="filters-wrap">
<?php foreach( $GLOBALS['my_query_filters'] as $key => $name ):
// get the field's settings without attempting to load a value
$field = get_field_object($key, false, false);
//var_dump($field);
// set value if available
View pre_get_posts.php
<?php // array of filters (field key => field name)
$GLOBALS['my_query_filters'] = array(
'field_5eed6c96d918c' => 'level',
'field_5eed6d09d918d' => 'length',
'field_5eed6d40d918e' => 'instructor',
'field_5eed6d75d918f' => 'language'
);
// action
View gist:aaaff8c07fe346f0eb80d98feb6ed243
// From page-stream.php - replace your div.col-lg-3 with this
//
<div class="col-lg-3 text-center">
<p>All Proceeds benefit
<img src="<?php echo get_stylesheet_directory_uri(); ?>/img/new/shiftmeals.png" class="donate-logo">
</p>
<script src="https://donorbox.org/widget.js" paypalExpress="false"></script><iframe allowpaymentrequest="" frameborder="0" height="100%" name="donorbox" scrolling="no" seamless="seamless" src="https://donorbox.org/embed/shiftmeals_hug-_your_farmer" style="max-width: 500px; min-width: 250px; max-height: none !important" width="100%"></iframe>
</div>
//
View access.log
68.142.59.19 - - [17/Jun/2020:14:52:35 +0000] "GET /_themes/neville-web-page/nevi1011.css HTTP/1.1" 200 6676 "http://clients.nevilleco.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
68.142.59.19 - - [17/Jun/2020:14:52:35 +0000] "GET /Neville%20Header%205.jpg HTTP/1.1" 200 12367 "http://clients.nevilleco.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
68.142.59.19 - - [17/Jun/2020:14:52:36 +0000] "GET /images/bldg_windows.jpg HTTP/1.1" 200 9095 "http://clients.nevilleco.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
68.142.59.19 - - [17/Jun/2020:14:52:36 +0000] "GET /images/2008/irem_logo.jpg HTTP/1.1" 200 5187 "http://clients.nevilleco.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"
68.142
View Ubuntu Output on Certbot & mysql update
root@neville-clients:~# apt-get install --only-upgrade certbot
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
root@neville-clients:~# sudo dpkg --configure -a
Setting up linux-headers-4.4.0-151 (4.4.0-151.178) ...
Setting up linux-modules-4.4.0-151-generic (4.4.0-151.178) ...
Setting up linux-image-4.4.0-151-generic (4.4.0-151.178) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.4.0-150-generic
I: /initrd.img.old is now a symlink to boot/initrd.img-4.4.0-150-generic
I: /vmlinuz is now a symlink to boot/vmlinuz-4.4.0-151-generic
I: /initrd.img is now a symlink to boot/initrd.img-4.4.0-151-generic
View hide-products-function.php
function healthyliving_remove_product_cats( $query ) {
$hidden_shop_categories = get_field('hidden_shop_categories', 'option');
// Comment out the line below to hide products in the admin as well
if ( is_admin() ) return;
if ( $query->is_search ) {
$query->set( 'tax_query', array(
View gist:da8aa335e2cdb28e87c1148a97768326
<div id="programs" class="row">
<!-- Text above the programs -->
<div class="columns small-12">
<h2>Programs</h2>
<p>Yoga Mala Foundation is proud to be operating and maintaining ongoing yoga and meditation programs in partnership with the following community organizations.
<br>
<br>
Explore »</p>
<br>
View category-community-education-series.php
<?php
/**
* Displays archive pages if a speicifc template is not set.
*
* For more info: https://developer.wordpress.org/themes/basics/template-hierarchy/
*/
get_header(); ?>
<div class="content">
View boilerplate.sass
/*********************
/* COLORS MIXINS
/*********************
@import url('https://fonts.googleapis.com/css?family=Lato:300,300i,400,700,900')
$font-stack: 'Lato', Helvetica, Arial, sans-serif
/* Color */
$orange: #EF7A23