Skip to content

Instantly share code, notes, and snippets.

@jameskoster
jameskoster / functions.php
Created January 12, 2013 16:01
WooCommerce - hide ratings on product loop
// Remove the product rating display on product loops
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
@tiborp
tiborp / custom.php
Last active May 9, 2017 20:16
Dynamically add Bootstrap column classes to footer widgets, depending on how many widgets are present
<?php
// Dynamically add Bootstrap column classes to footer widgets, depending on how many widgets are present
add_filter('dynamic_sidebar_params','tibs_footer_sidebar_params');
function tibs_footer_sidebar_params($params) {
$sidebar_id = $params[0]['id'];
if ( $sidebar_id == 'sidebar-footer' ) {
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 13, 2024 22:21
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@demircancelebi
demircancelebi / xmlToJson.js
Last active September 1, 2023 12:40 — forked from chinchang/xmlToJson.js
Function to convert XML to JSON
// Changes XML to JSON
// Modified version from here: http://davidwalsh.name/convert-xml-json
xmlToJson(xml) {
// Create the return object
let obj = {};
if (xml.nodeType === 1) { // element
// do attributes
if (xml.attributes.length > 0) {
obj['@attributes'] = {};