Skip to content

Instantly share code, notes, and snippets.

View cliftonc0613's full-sized avatar

Clifton T Canady cliftonc0613

View GitHub Profile
<script>
;( function() {
// wait until gsap & ScrollTrigger available
let chck_if_gsap_loaded = setInterval( function() {
if( window.gsap && window.ScrollTrigger ) {
// register scrolTrigger
gsap.registerPlugin( ScrollTrigger );
<?php
// Click to tweet functionality. Look for the username and hashtags at the end of the string.
$main_question = get_the_title();
$twitter_quote = get_field('twitter_quote');
?>
<div class="tweet-this">
<a class="click-tweet" href="http://twitter.com/share?text=<?php echo html_entity_decode($main_question); ?> &#34;<?php if($twitter_quote) { echo urlencode($twitter_quote); } ?>&#34; via <?php echo $fullname . ' ' . $twitter_handle; ?>&url=<?php echo $roundup_permalink; ?>&hashtags=backswing @getbackswing" target="_blank">
Click to Tweet
</a>
@cliftonc0613
cliftonc0613 / functions.php
Created October 15, 2019 12:02 — forked from Alipio123/functions.php
Elementor heading line height will inherit the theme astra customizer. Paste the code under functions.php
<?php
/**
* Custom Style that is base from the theme/
* Cons: Doesnt show real time edit in the customizer
*/
add_action('wp_head', 'custom_style_base_theme' );
function custom_style_base_theme() {
ob_start();
$output = "";
#add_payment_method .woocommerce-PaymentMethod label { margin-left: 10px; }
#add_payment_method li { clear: right; }
#add_payment_method #wc-stripe_sepa-form { padding: 10px; }
form#order_review #payment_method_stripe { margin: 25px 0 25px 25px; }
form#order_review #payment_method_stripe_sepa { margin: 25px 0 25px 25px; }
form#order_review .payment_methods label { margin-left: 10px; }
form#order_review li { clear: right; }
form#order_review #wc-stripe_sepa-form { padding: 10px; }
.wc_payment_method .payment_box label { display: inline; }
@cliftonc0613
cliftonc0613 / acf-inline-svg.php
Created December 7, 2018 15:47 — forked from derekshirk/acf-inline-svg.php
Output Inline SVGs from ACF image field
<?php
/* ————————————————————————— */
/* ACF Inline SVGs
/* ————————————————————————— */
$repeater = 'repeater_field_name'
if ( have_rows( $repeater ) ): ?>
<section class="content-main">
<div class="container"> <?php
@cliftonc0613
cliftonc0613 / functions.php
Created October 11, 2018 18:33 — forked from yratof/functions.php
ACF OEmbed with thumbnails
<?php
/* Pull apart OEmbed video link to get thumbnails out*/
function get_video_thumbnail_uri( $video_uri ) {
$thumbnail_uri = '';
// determine the type of video and the video id
$video = parse_video_uri( $video_uri );
// get youtube thumbnail
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Manage WooCommerce styles and scripts.
*/
function grd_woocommerce_script_cleaner() {
// Remove the generator tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@cliftonc0613
cliftonc0613 / wp-core-config.cl
Created May 11, 2017 13:38 — forked from jpen365/wp-core-config.cl
Things you can do with wp-cli
wp core config --dbname=database_name --dbuser=database_user --dbpass=user_password --dbhost=localhost --dbprefix=wp_
@cliftonc0613
cliftonc0613 / wp_auto_install.sh
Created April 7, 2017 12:12 — forked from nicomollet/wp_auto_install.sh
WP-CLI auto install script
#!/bin/bash
# Default options
LOCALE="fr_FR"
DB_HOST='localhost'
VIRUSTOTAL_KEY='YOUR_KEY'
printf "Name of the project? cf My Project: "
read PROJECT_NAME
@cliftonc0613
cliftonc0613 / update-wp-cli.sh
Created March 31, 2017 14:25 — forked from ajaegers/update-wp-cli.sh
Updating local wp-cli
echo '1. Updating WP-CLI in /usr/local/bin/' \
&& echo '2. Current version: ' \
&& wp --version \
&& cd /usr/local/bin \
&& curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x wp-cli.phar \
&& echo '3. WP-CLI test...' \
&& php wp-cli.phar --version \
&& echo '4. Replacing...' \
&& sudo mv wp-cli.phar wp \