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 wordpress_handbuch_shortcode( ) { | |
return '<a href="https://wordpress-handbuch.com">WordPress-Handbuch.com</a>'; | |
} | |
add_shortcode( 'wphb', 'wordpress_handbuch_shortcode' ); |
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 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 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 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 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
<meta name="description" content="Auszug/Exzerpt" /> | |
<meta name="twitter:site" content="Website-Titel" /> | |
<meta name="twitter:card" content="summary_large_image" /> | |
<meta name="twitter:title" content="Webseiten-Titel" /> | |
<meta name="twitter:description" content="Auszug/Exzerpt" /> | |
<meta name="twitter:image" content="Vorschaubild" /> | |
<meta name="twitter:url" content="Permalink-URL" /> | |
<meta property="og:site_name" content="Website-Titel" /> | |
<meta property="og:title" content="Webseiten-Titel" /> | |
<meta property="og:description" content="Auszug/Exzerpt" /> |
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
the_post_navigation( | |
array( | |
'next_text' => '<span class="meta-nav" aria-hidden="true">Weiter</span> ' . | |
'<span class="screen-reader-text">Weiter</span> <br/>' . | |
'<span class="post-title">%title</span>', | |
'prev_text' => '<span class="meta-nav" aria-hidden="true">Zurück</span> ' . | |
'<span class="screen-reader-text">Zurück</span> <br/>' . | |
'<span class="post-title">%title</span>', | |
) | |
); |
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
$previous_post=get_previous_post(); | |
$next_post=get_next_post(); | |
the_post_navigation( | |
array( | |
'next_text' => '<span class="meta-nav" aria-hidden="true">Weiter</span> ' . | |
'<span class="screen-reader-text">Weiter</span> <br/>' . | |
'<span class="post-title">%title</span>' . get_the_post_thumbnail( $next_post->ID, 'thumbnail' ), | |
'prev_text' => '<span class="meta-nav" aria-hidden="true">Zurück</span> ' . | |
'<span class="screen-reader-text">Zurück</span> <br/>' . | |
'<span class="post-title">%title</span>' . get_the_post_thumbnail( $previous_post->ID, 'thumbnail' ), |
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
$quiz_display .= "<script>\n"; | |
$quiz_display .= " jQuery(document).ready(function () {\n"; | |
$quiz_display .= " jQuery('.qmn_quiz_form input').click(function () {\n"; | |
$quiz_display .= " _paq.push(['trackEvent', 'Quiz', 'Klick', jQuery(this).attr('ID') + '-' + jQuery(this).attr('value')]);\n"; | |
$quiz_display .= " });\n"; | |
$quiz_display .= " });\n"; | |
$quiz_display .= "</script>\n"; |
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
<html><head><title>Wartung!</title></head><body>Der Welt kleinste Wartungsseite</body></html> |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4 | |
RewriteCond %{REQUEST_URI} !/wartung.html$ [NC] | |
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] | |
RewriteRule .* /wartung.html [R=302,L] | |
</IfModule> |
OlderNewer