Skip to content

Instantly share code, notes, and snippets.

View nextab's full-sized avatar

nexTab - Oliver Gehrmann nextab

View GitHub Profile
#region Enqueue Stylesheet for login page
function nxt_custom_login_stylesheet() {
wp_enqueue_style('wendo-login-styles', get_stylesheet_directory_uri() . '/assets/css/login-styles.css');
}
add_action( 'login_enqueue_scripts', 'nxt_custom_login_stylesheet' );
#endregion Enqueue Stylesheet for login page
function test($atts, $content = null) {
$a = shortcode_atts([
'class' => ''
], $atts);
$return_string = '';
$my_field = get_field('my_field');
$my_class = get_field('my_class');
$return_string .= '<div class="test ' . $a["class"] . '"><h4 class="my_headline">' . $my_field . '</h4>
<ul class="my-list"><li class="' . $my_class . '">Hier steht irgendwas</li></ul></div>';
return $return_string;
{
// Place your snippets for css here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
#region Allow Divi Library Items to get copied by Duplicate Post
function enable_duplicate_post_for_divi_library($post_types) {
$post_types[] = 'et_pb_layout'; // Add Divi library element post type
return $post_types;
}
add_filter('duplicate_post_enabled_post_types', 'enable_duplicate_post_for_divi_library');
#endregion Allow Divi Library Items to get copied by Duplicate Post
@nextab
nextab / Minimalistische Variante
Last active February 24, 2026 16:07
minimalistische Variante
/* #region Google Reviews */
.sb-feed-posts {
display: flex !important;
flex-flow: row wrap;
justify-content: space-between;
.sbr-owl-stage {
align-items: stretch;
display: flex;
flex-flow: row nowrap;
height: 100%;
/* Design #2 - Grid mit weißem Background */
/* #region Google Review Feed */
.sb-feed-posts {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
}
.sb-feed-container .sb-feed-posts::after {
width: 100%;
/* Design #1 - Ordentliche Anordnung im Grid */
/* #region Google Review Feed */
.sb-feed-posts {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
}
.sb-feed-container .sb-feed-posts::after {
if ( ! function_exists( 'wordpress_reading_time' ) ) :
function wordpress_reading_time( $post = 0, $wpm = 220 ) {
// Get the main content
if($post == 0) $post = get_the_ID();
$content = get_post_field( 'post_content', $post );
// Clean up content
// --> Remove HTML tags
// --> Remove Shortcode tags
$content_cleaned = strip_tags( strip_shortcodes( $content ) );
// Count the words
/* #region Custom Shortcodes */
details {
margin-top: 5px;
}
details summary {
color: #fff;
cursor: pointer;
display: inline-block;
list-style: none;
transition: all 350ms ease;
/* #region Custom Shortcodes */
details {
margin-top: 5px;
summary {
color: #fff;
cursor: pointer;
display: inline-block;
list-style: none;
transition: all 350ms ease;
text-decoration: underline;