Skip to content

Instantly share code, notes, and snippets.

View Paulsky's full-sized avatar

Paul Wijnberg Paulsky

View GitHub Profile
@cregx
cregx / How-to-Update-Vagrant-Box.md
Last active May 22, 2024 07:15
How to update Vagrant box laravel/homestead to a new version

How to update Vagrant box laravel/homestead to a new version

This manual was last checked for validity on January 28, 2023.

Introduction

This how-to describes the process of updating Laravel/Homestead boxes within the Vagrant environment. Those who use Vagrant for the development of (web) projects know the issue: updates become available several times a year, and then you have to recall what this simple update process entailed.

The instructions described here refer to a macOS environment.

@leepowers
leepowers / wpseo-yoast-sitemap-post-types.php
Created February 12, 2020 05:52
WordPress Yoast SEO: Custom sitemap with data sourced from one or more post types
<?php
/**
* USAGE:
* - Configure the return value of the `CUSTOM_SITEMAP_post_types` to required post type(s) - otherwise populates sitemap with all posts and pages
* - Search and replace the `CUSTOM_SITEMAP` string with a lowercase identifier name: e.g., "myseo", "vehicles", "customer_profiles", "postspage", etc.
* - Uses heredocs for inline XML: https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
*/
/**
@leepowers
leepowers / wpseo-yoast-sitemap-custom.php
Last active March 28, 2024 05:19
WordPress Yoast SEO: Create a custom sitemap with data not sourced from a custom post type.
<?php
/**
* USAGE:
* - Search and replace the `CUSTOM_SITEMAP` string with a lowercase identifier name: e.g., "vehicles", "customer_profiles"
* - The `your_alternate_data_source()` function does not exist; it's simply a placeholder for your own function that returns some sort of data array.
* - Uses heredocs for inline XML: https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
*/
/**
@orangerdev
orangerdev / variation-price-label.php
Created June 26, 2018 09:39
Display variation value in variation dropdown (Woocommerce)
<?php
/**
* Plugin Name: WooCommerce - Display Variation Price in Dropdown
* Plugin URI: https://ridwanarifandi.com
* Description: Display price in variation dropdown
* Version: 1.0.0
* Author: Ridwan Arifandi
* Author URI: https://ridwanarifandi
* Text Domain: woocommerce
*
@dasbairagya
dasbairagya / functions.php
Last active July 17, 2023 04:17
Add a WYSIWYG Field to WooCommerce Product Category Page
<?php
/********************************************Add a custom filed in the categoy*************************/
add_action( 'init', 'wpm_product_cat_register_meta' );
/**
* Register details product_cat meta.
*
* Register the details metabox for WooCommerce product categories.
*
*/
function wpm_product_cat_register_meta() {