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 | |
add_action( 'after_setup_theme', 'name_des_themes' ); | |
function name_des_themes() { | |
add_theme_support( 'wc-product-gallery-zoom' ); | |
add_theme_support( 'wc-product-gallery-lightbox' ); | |
add_theme_support( 'wc-product-gallery-slider' ); | |
} |
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 kurzlink() { | |
echo "<link rel='alternate shortlink' href='" . wp_get_shortlink() . "' />"; | |
} | |
add_action('wp_head','kurzlink'); |
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
// Kurzlink in WP zurückholen | |
if ( function_exists( 'add_filter' ) ) { | |
add_filter( 'get_shortlink', function ( $shortlink ) { | |
return $shortlink; | |
} ); | |
} |
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 | |
add_filter('jpeg_quality', function($arg){return 100;}); | |
?> |
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 $unterzeile = get_post_meta($post->ID, 'unterzeile', true); | |
if ($unterzeile) { ?> | |
<div class="unterzeile"> | |
<?php echo $unterzeile; ?> | |
</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 | |
// Code für die Überschrift und die Metadaten | |
if(!empty($post->post_excerpt)) { | |
echo '<div class="auszug">'; | |
the_excerpt(); | |
echo '</div>'; | |
} | |
// Code für die Ausgabe des Haupttextes |
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 | |
function aktualisierung() | |
{ | |
$artikel_erstellt = get_the_date('U'); | |
$artikel_aktualisiert = get_post_modified_time('U'); | |
// Nur Aktualisierungen die älter als 12h sind werden berücksichtigt | |
if (($artikel_aktualisiert - $artikel_erstellt ) > 43200) | |
{ | |
echo ' – Aktualisiert am ' . get_the_modified_date('d.m.Y') . ' um ' . get_post_modified_time('H:i'); |
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
# mod_deflate aktivieren | |
<FilesMatch "\\.(js|css|html|htm|php|xml|svg)$"> | |
SetOutputFilter DEFLATE | |
</FilesMatch> |
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 | |
// Private Taxonomie | |
function interne_hinweise() { | |
$labels = array( | |
'name' => _x( 'Interne Hinweise', 'Taxonomy General Name', 'text_domain' ), | |
'singular_name' => _x( 'Interner Hinweis', 'Taxonomy Singular Name', 'text_domain' ), | |
'menu_name' => __( 'Hinweise', 'text_domain' ), | |
'all_items' => __( 'Alle Hinweise', 'text_domain' ), | |
'parent_item' => __( 'Übergeordneter Hinweis', 'text_domain' ), |
NewerOlder