Skip to content

Instantly share code, notes, and snippets.

View HelloAlberuni's full-sized avatar
🏠
Working from home

Alberuni Azad HelloAlberuni

🏠
Working from home
View GitHub Profile
@HelloAlberuni
HelloAlberuni / GET ALL CATEGORIES IN WOOCOMMERCE
Created July 11, 2020 09:12 — forked from OneStep21/GET ALL CATEGORIES IN WOOCOMMERCE
HOW TO GET ALL CATEGORIES , SUB-CATEGORIES AND PRODUCTS IN WOOCOMMERCE WORDPRESS PLUGIN ( This will list all the top level categories and subcategories under them hierarchically. do not use the inner query if you just want to display the top level categories. Style it as you like. )
<?php
$taxonomy = 'product_cat';
$orderby = 'name';
$show_count = 0; // 1 for yes, 0 for no
$pad_counts = 0; // 1 for yes, 0 for no
$hierarchical = 1; // 1 for yes, 0 for no
$title = '';
$empty = 0;
@HelloAlberuni
HelloAlberuni / autotrack
Created April 3, 2020 18:20 — forked from adrianspeyer/autotrack
Automatic Tracking Of Outbound Links for gtags.js
<head>
<!--Need gtag.js code and jquery already in page -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
@HelloAlberuni
HelloAlberuni / trackoutboundlink-gtag.htm
Created April 2, 2020 22:35 — forked from coliff/trackoutboundlink-gtag.htm
Track outbound links with Google's gtag.js