Skip to content

Instantly share code, notes, and snippets.

View amrikarisma's full-sized avatar
I may be slow to respond.

Amri amrikarisma

I may be slow to respond.
View GitHub Profile
amrikarisma / custom-feed.php
Last active January 3, 2023 03:01
How to create custom feed WordPress without Plugins
* Create custom function and custom rss template.
* URL : /feed/feedname
* When url 404 not found, please open permalink setting then try again.
add_action('init', 'customRSS');
function customRSS(){
add_feed('feedname', 'customRSSFunc');
yudapc / Javascript Format NPWP
Last active November 16, 2023 03:21
Javascript Format NPWP. NPWP is ID tax each people of indonesian. Specificly in frontend need to format NPWP before render to user
// Javascript Format NPWP
function formatNpwp(value) {
if (typeof value === 'string') {
return value.replace(/(\d{2})(\d{3})(\d{3})(\d{1})(\d{3})(\d{3})/, '$1.$2.$3.$4-$5.$6');
ChrisLTD / functions.php
Created May 8, 2014 16:22
Fix so you can preview ACF field changes in Wordpress admin
Debug preview with custom fields
Taken from:
See also:
add_filter('_wp_post_revision_fields', 'add_field_debug_preview');
function add_field_debug_preview($fields){
$fields["debug_preview"] = "debug_preview";
return $fields;
paulund / example-wp-list-table.php
Last active May 20, 2024 05:29
An example code of using the WP_List_Table class. With Pagination.
* Plugin Name: Paulund WP List Table Example
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area
* Plugin URI:
* Author: Paul Underwood
* Author URI:
* Version: 1.0
* License: GPL2