Skip to content

Instantly share code, notes, and snippets.

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

Yojance Rabelo yojance

🏠
Working from home
View GitHub Profile
const threedayevent = [{
"id": "precons", "name": "PreCons", "date": "2024/09/23", "rows": [[{
"track": 79, "day": 23, "include": [], "exclude": [], "columns": 3, "title": "Track A PreConference Sessions"
},{
"track": 80, "day": 23, "include": [], "exclude": [], "columns": 3, "title": "Track B PreConference Sessions"
}], [{
"track": 82, "day": 23, "include": [], "exclude": [], "columns": 3, "title": "Evening Events"
}]]
}, {
@joemaller
joemaller / README.md
Last active November 1, 2024 17:17
Fix term counts so wp-admin Taxonomy listings show the correct number of items for the selected post_type.

Fixing post counts for WordPress taxonomies

The problem

For WordPress sites using Custom Post Types, Taxonomy admin listings show cumulative term-assignment totals for all post_types instead of counts specific to the selected post_type. Since Taxonomy listings are always attached to a single post_type, totals for shared taxonomies don't make sense.

The Goal

Fix term counts so wp-admin Taxonomy listings show the correct number of items for the selected post_type.

@wpscholar
wpscholar / webpack.config.js
Last active March 15, 2022 01:06
Get started with WebPack in WordPress today!
'use strict';
const autoprefixer = require('autoprefixer');
const browsers = require('@wordpress/browserslist-config');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
const webpack = require('webpack');
module.exports = function (env, options) {