Skip to content

Instantly share code, notes, and snippets.

View dariodev's full-sized avatar

Dario Devcic dariodev

  • Zagreb
View GitHub Profile
@justintadlock
justintadlock / one-theme-two-textdomains.php
Last active March 23, 2021 18:56
How one theme can have two textdomains and still work with translation systems.
<?php
/**
* The purpose of this file is to show how a theme can have multiple textdomains
* and still work with a single translation file. Translation tools like the
* one used on WordPress.org and Poedit are going to simply scan the project for
* text strings, regardless of the textdomain (and for good reasons that are
* not relevant here).
*
* The code below works with that system. It assumes that we have a single MO
* file based on the theme's textdomain. So, how can two textdomains work? It
@woogists
woogists / wc-change-number-of-related-products.php
Last active February 9, 2024 16:37
[Theming Snippets] Change number of related products output