Skip to content

Instantly share code, notes, and snippets.

View tnchuntic's full-sized avatar

Thomas N. Chuntic tnchuntic

View GitHub Profile
@amboutwe
amboutwe / yoast_seo_disable_single_post.php
Last active May 25, 2021 22:39
Remove Yoast from front end for a single post or page
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast from front end for a single post or page
* Credit: Dodinas https://stackoverflow.com/questions/37845968/disable-wordpress-yoast-seo-on-single-page
* Last Tested: Nov 08 2019 using Yoast SEO 12.4 on WordPress 5.2.4
* Note: For version 14+, please use the code here: https://developer.yoast.com/customization/yoast-seo/disabling-yoast-seo
*********
* DIFFERENT POST TYPES
* Post: Change 123456 to the post ID
* Page: Change is_single to is_page and 123456 to the page ID
@ahaywood
ahaywood / header.scss
Last active September 29, 2021 18:33
WordPress: Mega Menu
/*------------------------------------*\
#PRIMARY-MENU
\*------------------------------------*/
.primary-menu {
@include grid;
@include sans-serif;
font-weight: $bold;
height: $nav-bar-height;
&__wrapper {
INITIALISATION
==============
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)
@ChuckMac
ChuckMac / WordPress Plugin Activation Dependency Check
Created January 25, 2013 17:51
WordPress plugin depency check. Check if another plugin is installed before allowing yours to be installed
/**
* Activation Class
**/
if ( ! class_exists( 'WC_CPInstallCheck' ) ) {
class WC_CPInstallCheck {
static function install() {
/**
* Check if WooCommerce & Cubepoints are active
**/
if ( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ||