Skip to content

Total Theme: use Font definitions for all Elements

add_filter( 'wpex_typography_settings', function( $settings ) { if ( isset( $settings['entry_h1'] ) ) { $settings['entry_h1']['target'] = 'h1, .wpex-h1, .vcex-module h1, h1.vcex-heading'; } if ( isset( $settings['entry_h2'] ) ) { $settings['entry_h2']['target'] = 'h2, .wpex-h2, .vcex-module h2, h2.vcex-heading'; } if ( isset( $settings['entry_h3']…

Mehr Lesen

Manually migrating a WordPress Website

Sometimes if you relaunch a design on a given website in your development system, you might want to finally bring it live in the best and cleanest form technically possible. Usually I use WP Vivid to migrate my finished product…

Mehr Lesen

Custom Category Shortcode

// Add Custom Category Shortcode function enym_statusx( $atts ) { // Attributes $atts = shortcode_atts( array( 'label' => '', 'class' => '', 'link'=>'' ), $atts ); global $post; //$terms = wp_get_post_terms( $atts['post_id'], $atts['taxonomy']); //$term = get_term( '24', 'objektart' ); $terms…

Mehr Lesen

Custom Fields in Gutenberg

Gutenberg/block editor is using javascript and REST API, so to make this custom field editable via block editor, we need to register this field and make it available in WordPress REST API: register_post_meta( 'post', '_my_data', [ 'show_in_rest' => true, 'single'…

Mehr Lesen
turned-on monitor

Post ID Shortcode

add_shortcode( 'postid', 'post_id_sh' ); function post_id_sh($atts, $content, $tag) { global $post; return get_the_ID(); }

Mehr Lesen
a vase with a plant in it next to some books

Enym „Autobutton“ Shortcode

// Add Shortcode function enym_autobutton( $atts ) { // Attributes $atts = shortcode_atts( array( 'label' => '', 'class' => '', 'link'=>'' ), $atts ); global $post; //$terms = wp_get_post_terms( $atts['post_id'], $atts['taxonomy']); //$term = get_term( '24', 'objektart' ); $terms = wp_get_post_terms(…

Mehr Lesen
An den Anfang scrollen