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
<style> | |
// Laden der Schrift direkt in der CSS Datei. | |
// Beim Laden der Schrift im Header entfällt die Zeile 6. | |
@import url('https://fonts.googleapis.com/css?family=Montserrat:300i,400'); | |
h1 { | |
font-family: 'Montserrat', sans-serif; | |
} |
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
<!-- einzelnes Font --> | |
<link href="https://fonts.googleapis.com/css?family=Montserrat:300i,400" rel="stylesheet"> | |
<!-- Mehrere Fonts --> | |
<link href="https://fonts.googleapis.com/css?family=Caveat:400,700|Dosis|Saira|Saira+Semi+Condensed|Source+Code+Pro|Architects+Daughter|Caveat+Brush|Handlee" rel="stylesheet"> |
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 | |
// Bei Beitrag mit der ID 123 den kompletten Beitrag anzeigen, | |
// bei allen Anderen nur den Auszug. | |
if( get_the_id() == 123 ) { the_content(); } else { the_excerpt(); } | |
// Beim Beitrag mit der ID 123 den Weiterlesen-Button ausblenden. | |
if( get_the_ID() != 83 ){ /* hier Code für Button */ } | |
?> |
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 ( $caption = get_post( get_post_thumbnail_id() )->post_excerpt ) : ?> | |
<p class="caption-head"><?php echo $caption; ?></p> | |
<?php endif; ?> |
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 | |
/* | |
Plugin Name: Show PHP Version | |
Description: Shows the current PHP version in the "At a Glance" admin dashboard widget. | |
Version: 1.1 | |
Requires at least: 3.8 | |
Author: Torsten Landsiedel | |
Author URI: http://torstenlandsiedel.de | |
*/ | |
/** |
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 | |
// Macht den Shortcode innerhalb des Theme ausfürbar, Inhalt | |
$content = apply_filters('the_content', get_the_content()); | |
$content = '[effekt type="zoom" duration="1"]' . $content . '[/effekt]'; | |
$content = do_shortcode($content); | |
echo $content; | |
// Macht den Shortcode innerhalb des Theme ausfürbar, Auszug | |
$excerpt = apply_filters('the_excerpt', get_the_excerpt()); | |
$excerpt = '[effekt type="zoom" duration="1"]' . $excerpt . '[/effekt]'; |
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 | |
function rudr_filter_by_the_author() { | |
$params = array( | |
'name' => 'author', // das ist das "name" attribute für den Filter | |
'show_option_all' => 'Alle Autoren' // Anzeige für 'Alle Autoren' (Anzeige, wenn kein Filter gewählt) | |
); | |
if ( isset($_GET['user']) ) | |
$params['selected'] = $_GET['user']; // Autor mit der Variablen $_GET auswählen | |
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 | |
/* Ersetzt das [...]-Weitersesen Symbol gegen einen Weiterlesen Link. */ | |
function wpdocs_excerpt_more( $more ) { | |
return ' [<a href="'.get_permalink().'"> Weiter xxx lesen</a> ]'; | |
} | |
add_filter( 'excerpt_more', 'wpdocs_excerpt_more' ); | |
?> |