Skip to content

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
black Android smartphone

Simple Self Closing Shortcode Example

//self enclosing shortcode use as [subtitle class="css-class"]TEXT[/subtitle] //https://www.hostinger.com/tutorials/create-a-shortcode-in-wordpress function subtitle_link_att($atts, $content = null) { $default = array( 'class' => '', ); $a = shortcode_atts($default, $atts); $content = do_shortcode($content); return '<div class="'.($a['class']).'">'.$content.'</div>'; } add_shortcode('subtitle', 'subtitle_link_att'); //[subtitle class="subtitle"]Link[/subtitle]

Mehr Lesen
two people drawing on whiteboard

SPF Record bei HostEurope vornehmen

SPF für E-Mail-Hosting, Webhosting, Webserver und Microsoft 365 Hinweis: Wenn Ihre Domain per A-Record auf einen externen Server verweist, ergänzen Sie den SPF-Eintrag bitte um die IP-Adresse des externen Servers. Hierzu ein Beispiel, wobei die externe IP-Adresse in diesem Beispiel 1.2.3.4…

Mehr Lesen
An den Anfang scrollen