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 | |
$id = get_post($post->ID); | |
$tax = get_the_terms($id, 'position'); | |
$args = array( | |
'post_type' => 'people', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'position', | |
'field' => 'slug', | |
'terms' => $tax[0]->slug, |
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 | |
/* | |
* Custom queries for Elementor | |
* by ellegaard ID | |
*/ | |
/* Get direct children of current page | |
* | |
* for query ID use 'pages_direct_child_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
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 |
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
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
# 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
<?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
<?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
// 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>'; | |
} |
NewerOlder