Skip to content

Instantly share code, notes, and snippets.

Pablo dos Santos Gonçalves Pacheco pablo-sg-pacheco

View GitHub Profile
kevinwhoffman /
Last active Nov 13, 2018
Resources for Web Developers and Designers

Resources for Web Developers and Designers

This is an incomplete list of resources including courses and individuals who publish content that has helped me grow as a web developer and designer. Many of these resources are WordPress-specific as that is my current area of specialization. This list will grow over time. If you've got something to add, send me a link @kevinwhoffman and I'll check it out!

Course Providers

rilwis / admin-menu.php
Last active Oct 18, 2019
Move the admin menu for custom taxonomy in WordPress
View admin-menu.php
add_action( 'admin_menu', 'prefix_move_taxonomy_menu' );
function prefix_move_taxonomy_menu() {
add_submenu_page( 'edit.php?post_type=quiz', esc_html__( 'Sections', 'mb-quiz' ), esc_html__( 'Sections', 'mb-quiz' ), 'manage_categories', 'edit-tags.php?taxonomy=question_section' );
tripflex / functions.php
Last active Jun 14, 2020
WordPress Remove Filter (remove_filter converted to remove_class_filter) to remove Filter/Action without Class Object access. Works with WordPress 1.2+ (4.7+ support added 9-19-2016)
View functions.php
* Make sure the function does not exist before defining it
if( ! function_exists( 'remove_class_filter' ) ){
* Remove Class Filter Without Access to Class Object
* In order to use the core WordPress remove_filter() on a filter added with the callback
slushman / customizer-links.php
Last active Apr 1, 2020
How to link into the WordPress Customizer
View customizer-links.php
neilgee / woo-endpoint-custom.php
Last active Jun 5, 2020
WooCommerce Endpoint Order and Rename - My Account Page v2.6+
View woo-endpoint-custom.php
Plugin Name: WooCustom My Account
Plugin URI:
Description: WooCustom - add a custom area in my-account
Author: Neil Gee
Version: 1.0.0
Author URI:
License: GPL-2.0+
TimBHowe / functions.php
Created Mar 8, 2016
Forcibly remove the tax line item and calculation from the cart. (suggest just using the GEO setting in WooCommerce)
View functions.php
// Remove the Tax Line item from the cart.
function wc_remove_cart_tax_totals( $tax_totals, $instance ) {
if( is_cart() ) {
$tax_totals = array();
return $tax_totals;
jayarnielsen / functions.php
Last active Jan 7, 2020
WP Query Orderby Taxonomy Term Name
View functions.php
add_filter('posts_clauses', 'posts_clauses_with_tax', 10, 2);
function posts_clauses_with_tax( $clauses, $wp_query ) {
global $wpdb;
//array of sortable taxonomies
$taxonomies = array('example-taxonomy', 'other-taxonomy');
if (isset($wp_query-&gt;query['orderby']) &amp;&amp; in_array($wp_query-&gt;query['orderby'], $taxonomies)) {
$clauses['join'] .= "
LEFT OUTER JOIN {$wpdb-&gt;term_relationships} AS rel2 ON {$wpdb-&gt;posts}.ID = rel2.object_id
LEFT OUTER JOIN {$wpdb-&gt;term_taxonomy} AS tax2 ON rel2.term_taxonomy_id = tax2.term_taxonomy_id
LEFT OUTER JOIN {$wpdb-&gt;terms} USING (term_id)
leereamsnyder / wp_get_current_page_url.php
Last active Oct 11, 2019
In WordPress, get current URL including query string
View wp_get_current_page_url.php
Re-use some existing WordPress functions so you don't have to write a bunch of raw PHP to check for SSL, port numbers, etc
Place in your functions.php (or re-use in a plugin)
If you absolutely don't need or want any query string, use home_url(add_query_arg(array(),$wp->request));
Hat tip to:
BFTrick / woocommerce-settings-tab-demo.php
Last active Apr 4, 2020
A plugin demonstrating how to add a WooCommerce settings tab.
View woocommerce-settings-tab-demo.php
* Plugin Name: WooCommerce Settings Tab Demo
* Plugin URI:
* Description: A plugin demonstrating how to add a WooCommerce settings tab.
* Author: Patrick Rauland
* Author URI:
* Version: 1.0
* This program is free software: you can redistribute it and/or modify
omurphy27 / PHP Wordpress Removing Contact Form 7 Br tags when adding to template.html
Created Mar 15, 2013
PHP Wordpress Removing Contact Form 7 Br tags when adding to template
View PHP Wordpress Removing Contact Form 7 Br tags when adding to template.html
<!-- adding Contact Form 7 into Wordpress Template and removing <br> tags
add the following to the wordpress template -->
<?php echo do_shortcode('[contact-form-7 id="211" title="Spanish Contact Form"]') ; ?>
<!-- add the following into the wp-config.php -->
define ('WPCF7_AUTOP', false );
<!-- This will remove the <br> tags that get added automatically when you call Contact Form 7 from the template via shortcode-->
You can’t perform that action at this time.