Skip to content

Instantly share code, notes, and snippets.

@VlooMan
VlooMan / functions.php
Created Jun 7, 2019
No CAPTCHA reCAPTCHA for WooCommerce plugin - Lost password wrong link fix.
View functions.php
<?php
/**
* This piece of code fixes the "No CAPTCHA reCAPTCHA for WooCommerce" plugin's incorrect code when generating
* lost password link. You can copy it to functions.php of your theme or child theme until the plugin developer fixes
* the plugin behavior.
*/
// Add our fixed version only if the original filter is hooked already.
if ( has_filter( 'allow_password_reset', array( 'WC_Ncr_Lost_Password_Captcha', 'validate_lost_password_captcha' ) ) ) {
@VlooMan
VlooMan / Highlight CPT Archive and wp_nav_menu parents
Last active Nov 18, 2020
Highlight the CPT (Custom Post Type) Archive & its Parents ("current-menu-parent") & its Ancestors ("current-menu-ancestor") in the WordPress Navigation wp_nav_menu() when viewing the Archive itself or a single detail page of the CPT. Let's say you have CPT called "projects" and you have a WordPress menu set as "My Work (link to a page) > Projec…
View Highlight CPT Archive and wp_nav_menu parents
/**
* Gist Name: Highlight CPT Archive and wp_nav_menu parents
* Author: VlooMan
* Author URI: http://ishyoboy.com
*
* Highlight the CPT (Custom Post Type) Archive & its Parents ("current-menu-parent")
* & its Ancestors ("current-menu-ancestor") in the WordPress Navigation wp_nav_menu() when viewing the Archive itself
* or a single detail page of the CPT.
*
* Let's say you have CPT called "projects" and you have a WordPress menu set as