Skip to content

Instantly share code, notes, and snippets.

@zartgesotten
zartgesotten / alternative-sun-moon.html
Last active February 10, 2024 13:20
Source: https://codepen.io/Kevin-Geary/pen/QWzVKeb Add a code Element in Bricks and add this in the code section.
<button class="toggle-scheme">
<span class="toggle-scheme__icon toggle-scheme__icon--main">
<svg viewBox="0 0 24 24" fill="none">
<path d="M3.32031 11.6835C3.32031 16.6541 7.34975 20.6835 12.3203 20.6835C16.1075 20.6835 19.3483 18.3443 20.6768 15.032C19.6402 15.4486 18.5059 15.6834 17.3203 15.6834C12.3497 15.6834 8.32031 11.654 8.32031 6.68342C8.32031 5.50338 8.55165 4.36259 8.96453 3.32996C5.65605 4.66028 3.32031 7.89912 3.32031 11.6835Z" stroke="#073460" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</span>
<span class="toggle-scheme__icon toggle-scheme__icon--alt">
<svg viewBox="0 0 24 24" fill="none">
<path d="M12 3V4M12 20V21M4 12H3M6.31412 6.31412L5.5 5.5M17.6859 6.31412L18.5 5.5M6.31412 17.69L5.5 18.5001M17.6859 17.69L18.5 18.5001M21 12H20M16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8C14.2091 8 16 9.79086 16 12Z" stroke="#073460" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<table style=direction:ltr;border-collapse:collapse;><tr><td style=font-size:0;height:36px;line-height:0;></td></tr><tr><td><table cellpadding=0 cellspacing=0 border=0 style=width:100%; width=100%><tr><td><table cellpadding=0 cellspacing=0 style=border-collapse:collapse;line-height:1.15;><tr><td valign=top style="padding:.01px 0.01px 0.01px 0px;vertical-align:top;"><table cellpadding=0 cellspacing=0 style=border-collapse:collapse;><tr><td style=line-height:1.08;padding:.01px; nowrap><p style=margin:.1px;line-height:108.0%;font-size:18px;><span style=font-family:Arial;font-size:18px;font-weight:bold;color:#a6b8af;letter-spacing:0;white-space:nowrap;>Julia Wanninger</span><br><span style=font-family:Arial;font-size:14px;font-weight:bold;color:#545454;white-space:nowrap;>Praxis für Naturheilkunde Wanninger</span></p></td></tr><tr><td nowrap width=135 style=padding-top:12px;white-space:nowrap;width:135px;font-family:Arial;><p style=margin:1px;line-height:99%;font-size:12px;><span style=white-space:nowr
<div class="mitglied-single">
<strong><Field title /></strong>
<Field mg-strasse /><br>
<Field mg-plz /> <Field mg-ort /><br>
<If field="mg-festnetz" exists><strong>Festnetz:</strong> <Field mg-festnetz /><br /></If>
<If field="mg-mobil" exists><strong>Mobil:</strong> <Field mg-mobil /><br /></If>
<If field="mg-email" exists><strong>E-Mail:</strong> <a href="mailto:{Field mg-email}"><Field mg-email /></a><br /></If>
<If field="mg-website" exists><strong>Website:</strong> <a href="{Field mg-website}" target="_blank" rel="noopener"><Field mg-website /></a><br /></If>
</div>
// 1. Redirect logged-out users who try to visit '/dashboard' to the login page.
function redirect_dashboard_to_login() {
if ( is_page('dashboard') && !is_user_logged_in() ) {
wp_redirect( wp_login_url() );
exit;
}
}
add_action( 'template_redirect', 'redirect_dashboard_to_login' );
// 2. Redirect non-administrator users to '/dashboard' when they log in.
add_shortcode( 'gp_nav', 'tct_gp_nav' );
function tct_gp_nav( $atts ) {
ob_start();
generate_navigation_position();
return ob_get_clean();
}
<?php
/**
* Capture user login and add it as timestamp in user meta data
*
*/
function user_last_login( $user_login, $user ) {
update_user_meta( $user->ID, 'last_login', time() );
}
add_action( 'wp_login', 'user_last_login', 10, 2 );
/**
<?php
/* Add excerpt to pages */
function add_excerpt_to_pages() {
add_post_type_support( 'page', 'excerpt' );
}
add_action( 'init', 'add_excerpt_to_pages' );
?>
<?php
add_filter('block_editor_settings_all', function($editor_settings)
{
//get the child theme url
$child_theme_style_url = get_stylesheet_directory_uri() . '/style.css';
$editor_settings[ 'styles' ][] = array('css' => wp_remote_get($child_theme_style_url)[ 'body' ]);
return $editor_settings;
});
@zartgesotten
zartgesotten / Layout.css
Last active January 14, 2024 18:37
**ACHTUNG: Class cg-equal-align-button has to be added to content grid module.**
.pp-content-grid-post {
font-size: 14px;
}
.pp-content-grid-title {
margin-bottom:10px;
}
.pp-content-grid-image img {
height:120px!important;
User-agent: GPTBot Disallow: /