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 | |
// WordPress Shortcode - Content Hub: Lists all posts for the first category of a post | |
// Need help: https://bloggerpilot.com/en/content-hub-wordpress/ | |
function bp_categoryposts() { | |
// Get first category | |
$categories = get_the_category(); | |
if ( ! empty( $categories ) ) { |
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
/* https://startblogging101.com/kadence-blocks-content-boxes/ */ | |
selector .wp-block-kadence-column .kt-inside-inner-col { | |
display: flex; | |
flex-direction: column; | |
flex: 1; | |
} | |
selector .wp-block-kadence-column .kt-inside-inner-col .wp-block-kadence-advancedbtn { | |
margin-top: auto; |
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
echo '<span style="color: #99000;">Artikel aktualisiert am ' . get_the_modified_date('d.m.Y') . '<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
# Force trailing slash | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_METHOD} GET | |
RewriteCond %{REQUEST_URI} !(.*)/$ | |
RewriteCond %{REQUEST_URI} !^/wp-json/ | |
RewriteCond %{REQUEST_URI} !^/gravatars/ | |
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|png|jpeg|css|xml|txt|js|php|scss|webp|mp3|avi|wav|mp4|mov|pdf|html|htm|xst)$ [NC] | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1/ [L,R=301] |
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 | |
// Add a Logo to the WordPress Login | |
add_action('login_head', 'bloggerpilot_loginlogo'); | |
function bloggerpilot_loginlogo() { | |
echo '<style type="text/css"> | |
h1 a { | |
background-image: url(https://bloggerpilot.com/wp-content/uploads/2021/06/logo.svg) !important; | |
width: 200px !important; | |
height: 42px !important; |
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 | |
// FluentForms - Email Blacklist - Specific Forms | |
// Need help: https://bloggerpilot.com/snippet-fluentforms-e-mail-blacklist/ | |
add_filter('fluentform_validate_input_item_input_email', function ($error, $field, $formData, $fields, $form) { | |
The ID(s) of the form | |
$targetFormId = [13,14]; |
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
add_action( 'wp_head', function () { ?> | |
<script></script> | |
<?php }, -1000 ); |
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
add_action( 'wp_head', function () { ?> | |
<!-- TRUENDO Privacy Center --><script async="" id="truendoAutoBlock" type="text/javascript" src="https://cdn.priv.center/pc/truendo_cmp.pid.js" data-siteid="3dce3136-5f8d-4c4a-b418-cc414d098a34"></script><!-- End TRUENDO Privacy Center --> | |
<?php }, -1000 ); |
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 | |
// FluentForms - E-Mail Blacklist | |
// Need help: https://bloggerpilot.com/en/snippet-fluentforms-email-blacklist/ | |
add_filter('fluentform_validate_input_item_input_email', function ($error, $field, $formData, $fields, $form) { | |
// These listed domains will fail to submit the form | |
$blacklistDomains = ['gmail.com', 'hotmail.com', 'test.com']; | |
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 | |
/** | |
* Debug Pending Updates | |
* | |
* Displays hidden plugin and theme updates on update-core screen. | |
* Source: https://stackoverflow.com/a/52132227 | |
*/ | |
function debug_pending_updates() { |
NewerOlder