This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* WooCommerce - add SKU on cat pages */ | |
add_action( 'woocommerce_after_shop_loop_item_title', 'shop_sku', 5 ); | |
function shop_sku(){ | |
global $product; | |
echo '<span itemprop="productID" class="sku">' . __('SKU', 'woocommerce'). ': ' . $product->sku . '</span>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Remove unused Woocommerce widgets */ | |
function eid_unregister_woo_widgets() { | |
// unregister_widget( 'WC_Widget_Recent_Products' ); | |
unregister_widget( 'WC_Widget_Featured_Products' ); | |
// unregister_widget( 'WC_Widget_Product_Categories' ); | |
unregister_widget( 'WC_Widget_Product_Tag_Cloud' ); | |
unregister_widget( 'WC_Widget_Cart' ); | |
// unregister_widget( 'WC_Widget_Layered_Nav' ); | |
// unregister_widget( 'WC_Widget_Layered_Nav_Filters' ); | |
unregister_widget( 'WC_Widget_Price_Filter' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Remove unneccesary default widgets from backend | |
* Comment out what you wish to see | |
*/ | |
function unregister_default_widgets() { | |
unregister_widget('WP_Widget_Pages'); | |
unregister_widget('WP_Widget_Calendar'); | |
unregister_widget('WP_Widget_Archives'); | |
unregister_widget('WP_Widget_Links'); | |
unregister_widget('WP_Widget_Meta'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adds 'Udsolgt' label to produkts out of stock | |
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_stock', 10); | |
function woocommerce_template_loop_stock() { | |
global $product; | |
if ( ! $product->managing_stock() && ! $product->is_in_stock() ) | |
echo '<p class="stock out-of-stock">Udsolgt</p>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// #Adjusting Autoptimize warning limit to 1GB | |
add_filter('autoptimize_filter_cachecheck_maxsize','adjust_cachesize'); | |
function adjust_cachesize() { | |
return 1024*512*1024; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove woocomerce product data tabs | |
* @origin https://wp-pro.dk/guides/tilpas-woocommerce-faneblades-titel-og-overskrift | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'eid_remove_product_tabs', 98 ); | |
function eid_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); // Remove the description tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optimized expire cache and compression | |
# For WordPress | |
# by ellegaard ID | |
# Insert above default WP section in .htaccess - use with caution! | |
# BEGIN Manual editing for speed | |
## BEGIN Expire headers | |
<ifModule mod_expires.c> | |
AddType application/font-sfnt otf ttf | |
AddType application/font-woff woff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function eid_cpt_employee() { | |
register_post_type( 'eid_team_member', | |
array( | |
'labels' => array( | |
'name' => __( 'Medarbejdere', 'eid_function' ), | |
'singular_name => __( 'Medarbejder', 'eid_function' ), | |
), | |
'description' => __( 'Virksomhedens medarbejdere', 'eid_function' ), | |
'public' => true, | |
'has_archive' => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** better solution | |
* description on https://wp-pro.dk/?p=3656 | |
**/ | |
:target { scroll-margin-top:75px} | |
/** old solution - don't use this! **/ | |
body:not(.elementor-editor-active) /* for not messsing up elementor editor */ | |
*[id]:before { | |
content: ""; | |
display:block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ad, af, aldrig, alle, alt, anden, andet, andre, at, bare, begge, blev, blive, bliver, da, de, dem, den, denne, der, deres, det, dette, dig, din, dine, disse, dit, dog, du, efter, ej, eller, en, end, ene, eneste, enhver, er, et, far, fem, fik, fire, flere, fleste, for, fordi, forrige, fra, få, får, før, god, godt, ham, han, hans, har, havde, have, hej, helt, hende, hendes, her, hos, hun, hvad, hvem, hver, hvilken, hvis, hvor, hvordan, hvorfor, hvornår, i, ikke, ind, ingen, intet, ja, jeg, jer, jeres, jo, kan, kom, komme, kommer, kun, kunne, lad, lav, lidt, lige, lille, man, mand, mange, med, meget, men, mens, mere, mig, min, mine, mit, mod, må, ned, nej, ni, nogen, noget, nogle, nu, ny, nyt, når, nær, næste, næsten, og, også, okay, om, op, os, otte, over, på, se, seks, selv, ser, ses, sig, sige, sin, sine, sit, skal, skulle, som, stor, store, syv, så, sådan, tag, tage, thi, ti, til, to, tre, ud, under, var, ved, vi, vil, ville, vor, vores, være, været |