Skip to content

Instantly share code, notes, and snippets.

View MissBethD's full-sized avatar

Beth Downey MissBethD

View GitHub Profile
@MissBethD
MissBethD / social.php
Created February 8, 2021 17:04 — forked from morgyface/social.php
WordPress | ACF | Social Media Links using Advanced Custom Fields and FontAwesome
<?php
if( have_rows('social_media', 'option') ):
echo '<div class="container social my-4">';
echo '<p class="follow mb-0 align-middle">Follow us</p>';
echo '<ul class="nav align-middle">';
while ( have_rows('social_media', 'option') ) : the_row();
$socialchannel = get_sub_field('social_channel', 'option');
$socialurl = get_sub_field('social_url', 'option');
echo '<li class="nav-item">';
echo '<a class="nav-link" rel="nofollow noopener noreferrer" href="' . $socialurl . '" target="_blank">';
@MissBethD
MissBethD / yoast
Created November 11, 2020 16:16 — forked from aderaaij/yoast
Wordpress - Move yoast seo boxes to bottom of post/page
// Move Yoast to bottom
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');
@MissBethD
MissBethD / functions.php
Created October 8, 2020 17:40 — forked from paaljoachim/functions.php
WooCommerce: Adding multiple custom fields to the order notes area in the checkout page
/* 1. Adds a custom field. NB. I am using some Norwegian words in the below text.
* 2. Then adds a validate error message if person does not fill out the field.
* 3. Then adds the custom field to the order page.
https://businessbloomer.com/woocommerce-add-custom-checkout-field-php/
https://businessbloomer.com/woocommerce-add-shipping-phone-checkout/
https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/#section-6
*/
add_action( 'woocommerce_before_order_notes', 'my_custom_checkout_field' );
function my_custom_checkout_field( $checkout ) {
@MissBethD
MissBethD / chicken-tikka-masala.md
Created July 21, 2017 15:00 — forked from levicole/chicken-tikka-masala.md
Crock Pot Chicken Tikka Masala

Chicken Tikka Masala

  • 1.5-2 lbs of boneless skinless chicken breasts (or thighs if you prefer)
  • 1 large onion, diced
  • 4 cloves of garlic, minced
  • 2 tbsp. fresh ginger, minced (sub 1/4 tsp of ground ginger if needed)
  • 1 28 oz can of tomato sauce
  • 1 14oz can of diced tomatoes (drained)
  • 2 tbsp of tomato paste (or just one whole small can)
  • 2 tbsp. olive oil
  • 2 tbsp. Garam masala
@MissBethD
MissBethD / Contract Killer 3.md
Created April 6, 2017 14:56
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@MissBethD
MissBethD / gist:fb1bd6e942dcf3b6874b3c0c4e4e002d
Created January 11, 2017 19:31 — forked from stellarcowboy/gist:f1670515c15bcafdf7a49e8c3bcfd33e
Add URL parameters to YouTube oembed in WordPress
/**
* youtube_embed_url_parameters function.
*
* @access public
* @param string $html
* @param string $url
* @param array $args
* @return string $html
*/
function youtube_embed_url_parameters( $html, $url, $args ) {