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 j0e_register_block_patterns() { | |
if ( class_exists( 'WP_Block_Patterns_Registry' ) ) { | |
register_block_pattern( | |
'j0e-header-pattern', | |
array( | |
'title' => __( 'Überschrift', 'j0e-patterns' ), |
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 featured image column to WP admin panel - posts AND pages | |
* See: https://bloggerpilot.com/featured-image-admin/ | |
*/ | |
// Set thumbnail size | |
add_image_size( 'j0e_admin-featured-image', 60, 60, false ); |
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 | |
/** | |
* Astra Theme: Display last modified and published date in the post metadata. | |
* See: https://j0e.org/astra-tipps-tricks/ | |
*/ | |
function j0e_post_date( $output ) { | |
$output = ''; | |
$format = apply_filters( 'astra_post_date_format', '' ); | |
$published_date = esc_html( get_the_date( $format ) ); |
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 | |
/** | |
* Custom Post Type: Landingpages. | |
* Add to your functions.php | |
*/ | |
function cptui_register_my_cpts_landingpage() { | |
/** | |
* Post Type: Landingpages. |
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
ab | |
aber | |
abermaliges | |
abermals | |
abgerufen | |
abgerufene | |
abgerufener | |
abgerufenes | |
abgesehen | |
acht |
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
# WordPress .htaccess von Jochen Gererstorfer | |
# https://j0e.org/wordpress-htaccess/ | |
# http zu https weiterleiten | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IfModule> |
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 | |
/** | |
* Astra Theme: Display only last modified date in the post metadata. | |
* | |
*/ | |
function j0e_post_date( $output ) { | |
$output = ''; | |
$format = apply_filters( 'astra_post_date_format', '' ); | |
$modified_date = esc_html( get_the_modified_date( $format ) ); |
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
; Vollständiger Artikel auf https://j0e.org/forum/thread/anfuehrungszeichen/ | |
; Deutsche Anführungszeichen unten und oben -> auf ALT+1 und Alt+2 | |
!1::Send „ ; Alt+1 anstatt Alt+0132 | |
!2::Send “ ; Alt+2 anstatt Alt+0147 | |
; Französische Anführungszeichen, Chevrons oder Guillemets -> auf ALT+3 und Alt+4 | |
!3::Send » ; Alt+3 anstatt Alt+0187 | |
!4::Send « ; Alt+4 anstatt Alt+0171 |
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 | |
// Änderungsdatum automatisch einfügen | |
function j0e_change_date($content) { | |
if ( (is_single() && get_post_type() == 'post') || is_page() ) { | |
$artikel_erstellt = get_the_date('U'); | |
$artikel_aktualisiert = get_post_modified_time('U'); | |
// Nur ausgeben, wenn Aktualisierung älter als einen Tag ist | |
if (($artikel_aktualisiert - $artikel_erstellt) > 86400) |
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 featured image to RSS feed | |
function j0e_imagetoRSS($content) { | |
global $post; | |
if ( has_post_thumbnail( $post->ID ) ){ | |
$content = ' | |
' . get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'float:left; margin:0 10px 10px 0;' ) ) . ' | |
' . $content; | |
} |