This file contains hidden or 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
/** | |
* Allow only certain block types in Gutenberg | |
* Possible: | |
* core/list, core/quote, core/cover-image, core/paragraph, core/image, core/heading, core/gallery, core/audio, core/file, core/video | |
* core/freeform, core/html, core/code, core/preformatted, core/pullquote, core/table, core/verse | |
* core/button, core/text-columns, core/more, core/nextpage, core/separator, core/spacer | |
* core/shortcode, core/archives, core/categories, core/latest-comments, core/latest-posts | |
* core-embed/: twitter, youtube, facebook, Instagram, wordpress, soundcloud, spotify, flickr, vimeo, animoto, cloudup, collegehumor, dailymotion, funnyordie, hulu, imgur, issuu, kickstarter, meetup-com, mixcloud, photobucket, polldaddy, reddit, reverbnation, screencast, sribd, slideshare, smugmug, speaker, ted, tumblr, videopress, wordpress-tv | |
*/ | |
function my_allowed_block_types( $allowed_blocks ) { |
This file contains hidden or 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
.ribbon { | |
width: 150px; | |
height: 150px; | |
overflow: hidden; | |
position: absolute; | |
z-index:9; | |
} | |
.ribbon span { | |
position: absolute; |
This file contains hidden or 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 if (get_post_meta(get_the_ID(), 'Ribbon', true) != '') { ?> | |
<div class="ribbon ribbon-top-right"> | |
<span><?php echo (get_post_meta(get_the_ID(), 'Ribbon', true)); ?></span> | |
</div> | |
<?php } ?> |
This file contains hidden or 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 | |
/** | |
* Plugin Name: WH Custom Post Type | |
*/ | |
function add_wh_events() { | |
$labels = array( | |
'name' => 'Veranstaltungen', | |
'singular_name' => 'Veranstaltung', | |
'add_new' => 'Erstellen', | |
'add_new_item' => 'Neue Veranstaltung erzeugen', |
This file contains hidden or 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
/** | |
* Disable all color options in Gutenberg | |
*/ | |
function my_theme_and_gutenberg_adjustments() { | |
add_theme_support( 'editor-color-palette' ); | |
add_theme_support( 'disable-custom-colors' ); | |
} | |
add_action( 'after_setup_theme', 'my_theme_and_gutenberg_adjustments' ); |
This file contains hidden or 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 | |
/** | |
* @package WH_Hello_World | |
* @version 1.0.0 | |
*/ | |
/* | |
Plugin Name: WH Hello World | |
Plugin URI: https://wordpress-handbuch.com | |
Description: Testausgabe in Front- und Backend | |
Author: Richard Eisenmenger |
This file contains hidden or 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 wordpress_handbuch_shortcode( ) { | |
return '<a href="https://wordpress-handbuch.com">WordPress-Handbuch.com</a>'; | |
} | |
add_shortcode( 'wphb', 'wordpress_handbuch_shortcode' ); |
NewerOlder