Skip to content

Instantly share code, notes, and snippets.

View catchicktin's full-sized avatar
🎯
Focusing

TIn TIn catchicktin

🎯
Focusing
View GitHub Profile
@catchicktin
catchicktin / yoast_seo_breadcrumb_remove_link.php
Created August 8, 2024 18:25 — forked from amboutwe/yoast_seo_breadcrumb_remove_link.php
These snippets are examples of how you can modify the Yoast SEO breadcrumb visual output. These snippets will not alter the breadcrumb schema output. Please consult the schema documentation to change the breadcrumb schema: https://developer.yoast.com/features/schema/api#to-add-or-remove-graph-pieces
@catchicktin
catchicktin / Ajax loading image gallery WordPress
Created July 7, 2023 03:06 — forked from azizultex/Ajax loading image gallery WordPress
Ajax loading image gallery WordPress ( coded for oliveorange.com )
/****************************************************************
Project: MySavingWallet
Resource: http://www.ibenic.com/wordpress-file-upload-with-ajax/
HTML FORM
*****************************************************************/
<dt><?php esc_html_e( 'Support Doc', 'listify_child' ); ?></dt>
<dd>
<section>
@catchicktin
catchicktin / generate_video_embed_url.php
Created July 7, 2023 03:06 — forked from azizultex/generate_video_embed_url.php
Generate Youtube and Vimeo Video Embed URL dynamically
/**
* get youtube video ID from URL
* http://stackoverflow.com/questions/6556559/youtube-api-extract-video-id
* @param string $url
* @return string Youtube video id or FALSE if none found.
*/
function youtube_id_from_url($url) {
$pattern =
'%^# Match any youtube URL
(?:https?://)? # Optional scheme. Either http or https
/**
* Add custom SimpleLine icons
*
* @param $icons - taken from filter - vc_map param field settings['source']
* provided icons (default empty array). If array categorized it will
* auto-enable category dropdown
*
* @since 1.0
* @return array - of icons for iconpicker, can be categorized, or not.
*/
function mainSlider() {
var BasicSlider = $('.slider-active');
BasicSlider.on('init', function(e, slick) {
var $firstAnimatingElements = $('.single-slider:first-child').find('[data-animation]');
doAnimations($firstAnimatingElements);
});
BasicSlider.on('beforeChange', function(e, slick, currentSlide, nextSlide) {
var $animatingElements = $('.single-slider[data-slick-index="' + nextSlide + '"]').find('[data-animation]');
doAnimations($animatingElements);
});
@catchicktin
catchicktin / FontAwesome-v5.0.9-Free.json
Created May 12, 2023 04:43 — forked from sakalauskas/FontAwesome-v5.0.9-Free.json
List of all Font Awesome 5 icons in JSON Cheetsheet
{
"fas fa-address-book","fas fa-address-card","fas fa-adjust","fas fa-align-center","fas fa-align-justify","fas fa-align-left","fas fa-align-right","fas fa-allergies","fas fa-ambulance","fas fa-american-sign-language-interpreting","fas fa-anchor","fas fa-angle-double-down","fas fa-angle-double-left","fas fa-angle-double-right","fas fa-angle-double-up","fas fa-angle-down","fas fa-angle-left","fas fa-angle-right","fas fa-angle-up","fas fa-archive","fas fa-arrow-alt-circle-down","fas fa-arrow-alt-circle-left","fas fa-arrow-alt-circle-right","fas fa-arrow-alt-circle-up","fas fa-arrow-circle-down","fas fa-arrow-circle-left","fas fa-arrow-circle-right","fas fa-arrow-circle-up","fas fa-arrow-down","fas fa-arrow-left","fas fa-arrow-right","fas fa-arrow-up","fas fa-arrows-alt","fas fa-arrows-alt-h","fas fa-arrows-alt-v","fas fa-assistive-listening-systems","fas fa-asterisk","fas fa-at","fas fa-audio-description","fas fa-backward","fas fa-balance-scale","fas fa-ban","fas fa-band-aid","fas fa-barcode","fas fa-bars",
@catchicktin
catchicktin / gist:3627e2e185ef0904b712613ab2f8066e
Created February 21, 2023 05:39 — forked from webaware/gist:6260468
WooCommerce purchase page add-to-cart with quantity and AJAX, without customising any templates. See blog post for details: http://snippets.webaware.com.au/snippets/woocommerce-add-to-cart-with-quantity-and-ajax/
<?php
/**
* start the customisation
*/
function custom_woo_before_shop_link() {
add_filter('woocommerce_loop_add_to_cart_link', 'custom_woo_loop_add_to_cart_link', 10, 2);
add_action('woocommerce_after_shop_loop', 'custom_woo_after_shop_loop');
}
add_action('woocommerce_before_shop_loop', 'custom_woo_before_shop_link');
@catchicktin
catchicktin / functions.php
Created February 15, 2023 09:11 — forked from RichardNesbitt/functions.php
WP Bakery Page Builder - Custom Background Parameters for vc_column_inner
/*
Add the following to your theme's functions.php file
In this case, I wanted to add a background image outside of the normal controls
so I could darken it by a % using linear gradients.
I added 2 fields to vc_column_inner:
*/
// The background image
vc_add_param("vc_column_inner", array(
@catchicktin
catchicktin / page.php
Created October 27, 2022 20:41 — forked from brycejacobson/page.php
WordPress Loop inside foreach to get posts under custom taxonomy.
<!-- Begin custom tax loop -->
<ul class="accordion" data-accordion>
<?php
//Retrieve custom taxonomy terms using get_terms and the custom post type.
$categories = get_terms('state');
//Iterate through each term
foreach ( $categories as $category ) :
?>