Skip to content

TOTAL Theme: Create Image Gallery Meta Box for Custom Post Types

/** * Add meta boxes to selected post types * * @since 1.0 */ function easy_image_gallery_2_add_meta_box() { $post_types = array('ausstellung');//easy_image_gallery_2_allowed_post_types(); if ( ! $post_types ) { return; } foreach ( $post_types as $post_type => $status ) { add_meta_box( 'easy_image_gallery_2', esc_html__(…

Mehr Lesen

Sortable Filesize Column in Media Library

/* ------------------------------ MEDIA METADATA ------------------------------ */ // edits image meta data add_action( 'add_attachment', 'my_edit_image_meta_data' ); function my_edit_image_meta_data( $post_ID ) { // checks if the uploaded file is an image if ( wp_attachment_is_image( $post_ID ) ) { // finds the total…

Mehr Lesen

Update some meta for all media library items

Only run this once! uncomment the "add_action" then open site and then comment it out again. Watch your timeout depending on how many images you have. /* * Update ALL attachments metada with Width and Height * * Important: Run…

Mehr Lesen
white computer keyboard

All relevant special charcters and their shortcuts on a Mac

@Atalt + L€Euroalt + E$Dollarshift + 4£Britisches Pfundalt + shift + 4©Copyrightalt + G®Registeredalt + R™Trademarkalt + shift + DApplealt + shift + +§Paragraphshift + 3~Tildealt + N (dann Leertaste)(Klammer aufshift + 8)Klammer zushift + 9[eckige Klammer aufalt + 5]eckige Klammer…

Mehr Lesen
a purple and white square with the word woo on it

WooCommerce: Price without Tax as Price Suffix

function show_price_without_tax($price_html, $product) { if (is_product() && wc_prices_include_tax()) return sprintf(__('%1$s', 'woocommerce'), wc_price(wc_get_price_excluding_tax($product), array('ex_tax_label' => true))); return $price_html; } add_filter('woocommerce_get_price_suffix', 'show_price_without_tax', 999, 2); Source

Mehr Lesen
person holding white samsung android smartphone

Scroll Depth Indicator

jQuery(function($) { $( document ).ready(function() { if ($('.animatedCounter').length) { $(window).scroll(testScroll); } }); var viewed = false; function isScrolledIntoView(elem) { var docViewTop = $(window).scrollTop(); var docViewBottom = docViewTop + $(window).height(); var elemTop = $(elem).offset().top; var elemBottom = elemTop + $(elem).height(); return…

Mehr Lesen
An den Anfang scrollen