Skip to content

Instantly share code, notes, and snippets.

@dinolatoga
dinolatoga / woocommerce-optimize-scripts.php
Created July 10, 2024 09:14 — forked from DevinWalker/woocommerce-optimize-scripts.php
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@dinolatoga
dinolatoga / fluid-fonts-and-icons.css
Created January 31, 2020 23:07 — forked from yankiara/fluid-fonts-and-icons.css
Fluid fonts and icons in CSS
body {
--base: 20;
--scale-headings: 1.44;
--scale-mobile: 0.7;
--scale-mobile-headings: 0.4;
--scale-icons: 1.4;
--min-viewport: 480;
--max-viewport: 1600;
--max-size: var(--base);
}
@dinolatoga
dinolatoga / remote-git.md
Created October 13, 2015 01:12 — forked from Integralist/remote-git.md
Basic set-up of remote git repository on a standard server

Set-up remote git repository on a standard server

The first thing to do is to install Git on the remote server.

Once you do that the rest of the process is split into three sections:

  1. Server set-up
  2. Local set-up (push commits)
  3. Server (pull commits)
@dinolatoga
dinolatoga / gist:0aa34115f921ef3939c5
Created September 18, 2015 12:56 — forked from remyperona/gist:13348dbcd2bbb0d9406f
WordPress customizer custom tinymce control
class Text_Editor_Custom_Control extends WP_Customize_Control
{
public $type = 'textarea';
/**
** Render the content on the theme customizer page
*/
public function render_content() { ?>
<label>
<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
<?php
@dinolatoga
dinolatoga / related-posts.php
Last active December 20, 2015 04:09 — forked from jtallant/jt-related-posts.php
Get WordPress Related Posts by tags if available and category if not