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
// In die Design-Einstellungen -> CSS von der ZEILE! | |
@media (min-width: 981px) { | |
selector .et_pb_column { | |
display: flex; | |
flex-flow: column nowrap; | |
align-items: flex-start; | |
justify-content: center; | |
gap: 0; | |
} |
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 | |
#region Clean Up WP Admin Bar | |
function remove_admin_bar_links() { | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_menu('wp-logo'); // Remove the Wordpress logo + sub links | |
// $wp_admin_bar->remove_menu('site-name'); // Remove the site name menu | |
// $wp_admin_bar->remove_menu('view-site'); // Remove the view site link | |
// $wp_admin_bar->remove_menu('updates'); // Remove the updates link | |
// $wp_admin_bar->remove_menu('comments'); // Remove the comments link | |
$wp_admin_bar->remove_menu('new-content'); // Remove the content link |
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 | |
// Get all ACF fields of the current post | |
$custom_fields = get_fields(); | |
$available_fields = array(); | |
if ($custom_fields) { | |
foreach ($custom_fields as $field_name => $field_value) { | |
$available_fields[$field_name] = $field_value; | |
} | |
} |
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() { | |
// Add scroll class to body when scrolling | |
function handleScroll() { | |
const scrollPosition = window.scrollY || document.documentElement.scrollTop; | |
if (scrollPosition > 0) { | |
document.body.classList.add('scrolling'); | |
} else { | |
document.body.classList.remove('scrolling'); | |
} |
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
add_filter( 'use_block_editor_for_post', '__return_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 | |
/** | |
* Search results template | |
* @package Relevanssi Live Ajax Search | |
*/ | |
function get_custom_post_type_labels() { | |
return array( | |
'projects' => 'Projekte', | |
'post' => 'Neuigkeiten', |
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
<globalRules> | |
<responses> | |
- Repeat the question before thinking about the solution. | |
- Think before you write the code in <thinking> tags. Think through what effect it will have on other code. Think through whether this code would be better in another location. Think through whether any types need to be updated. Think through whether this code inherits code from a parent component or module or passes anything to a child component or module. Think through if it is the simplest solution. Think through whether the file is a client or server context and if your code can work in this context. | |
- Use reflection to verify your own answer. | |
- Show your "reflection". | |
- Show your "chain of thought" for suggestions. | |
- Be concise; remove any non-pertinent language from responses (ex: remove "I apologize") | |
- Add a "Confidence Score", as a % out of 100, that represents your confidence in your suggested code. | |
- Recommend best practices. Be opinionated. |
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 nxt_remove_et_viewport_meta() { | |
remove_action('wp_head', 'et_add_viewport_meta'); | |
} | |
add_action('after_setup_theme', 'nxt_remove_et_viewport_meta'); | |
function nxt_enable_zoom() { | |
echo '<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0, minimum-scale=0.1, maximum-scale=10.0">'; | |
} | |
add_action('wp_head', 'nxt_enable_zoom'); |
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
class Accordion { | |
constructor(el) { | |
// Store the <details> element | |
this.el = el; | |
// Store the <summary> element | |
this.summary = el.querySelector('summary'); | |
// Store the <div class="content"> element | |
this.content = el.querySelector('.sub-menu, .wp-block-group'); | |
// Store the animation object (so we can cancel it if needed) |
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
.white-stripe { | |
height: 30px; | |
background-image: linear-gradient(120deg, red 0%, red 30%, white 30%, white 35%, black 5%, black 100%); | |
} | |
/* Alternative Lösung: */ | |
.skewed_container { | |
overflow: hidden; | |
} |
NewerOlder