Skip to content

Instantly share code, notes, and snippets.

View delennerd's full-sized avatar

Pascal Lehnert delennerd

View GitHub Profile
@delennerd
delennerd / WordPress_functions_utils.php
Last active August 5, 2022 10:08 — forked from juanlopezdev/WORDPRESS_functions_utils.php
Useful functions for wordpress #php #wordpress
<?php
/**
* Funciones Útiles Wordpress / Useful functions for wordpress
*/
// Print Nav Menu
// https://developer.wordpress.org/reference/functions/wp_nav_menu/
//---------------------------------------------------------------
wp_nav_menu(array(
@delennerd
delennerd / WC-Snippets.php
Last active January 7, 2024 17:59 — forked from mairagall/WC Snippets
WooCommerce Snippets
<?php
//Add a stylesheet after WC styles
add_action( 'wp_enqueue_scripts', 'maira_add_stylesheet' );
function maira_add_stylesheet() {
wp_register_style( 'woocommerce', get_stylesheet_directory_uri() . '/woocommerce/woocommerce.css' );
if ( class_exists( 'woocommerce' ) ) {
wp_enqueue_style( 'woocommerce' );
}
}
@delennerd
delennerd / bp-profile-tab-and-subnav.php
Created September 2, 2021 15:11 — forked from shanebp/bp-profile-tab-and-subnav.php
BuddyPress add profile tab and subnav
<?php
function add_animal_tabs() {
global $bp;
bp_core_new_nav_item( array(
'name' => 'Animals',
'slug' => 'animals',
'parent_url' => $bp->displayed_user->domain,
'parent_slug' => $bp->profile->slug,