Skip to content

Instantly share code, notes, and snippets.

René A. Da Rin radarin

Block or report user

Report or block radarin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wp-unregister-sidebar.php
<?php
function remove_some_widgets(){
unregister_sidebar( 'left-sidebar' );
unregister_sidebar( 'top-widget' );
}
add_action( 'widgets_init', 'remove_some_widgets', 11 );
?>
@radarin
radarin / wp-old-shortcode.php
Created Apr 19, 2020
Alten Shortcode unterdrücken
View wp-old-shortcode.php
add_shortcode( 'pluginshortcode', '__return_false' );
@radarin
radarin / wp.widget.theme.php
Last active Mar 1, 2020
Widget in WP Theme anzeigen
View wp.widget.theme.php
<?php if ( is_active_sidebar( 'neues_widget' ) ) : ?>
<?php dynamic_sidebar( 'neues_widget' ); ?>
<?php endif; ?>
@radarin
radarin / wp.widget.functions.php
Created Mar 1, 2020
Widget-Area ins WP Theme integrieren
View wp.widget.functions.php
<?php
function deinthemename_widgets_init() {
register_sidebar(array(
'name' => 'Widget Name',
'id' => 'neues_widget',
'description' => 'Eine zusätzliche Widget Area',
'before_widget' => '<div class=”juhu_ein_widget”>',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
@radarin
radarin / wp.snippet.hiddenmenu.php
Last active Feb 5, 2020
Worpress Menu Eintrag bei leerer Kategorie ausblenden
View wp.snippet.hiddenmenu.php
<?php
// Diese Funktion wird nur im Frontend angewendet
function shortcode_posts_function(){
// Parameter
$args = array(
'category' => '43', // Kategorie ID
'numberposts' => 1 // Anzahl der zu ladenden Beiträge
);
@radarin
radarin / gist:00a3885c88181bf98eb77f04eda4578c
Last active Jan 19, 2020
FileMaker: TriggerKeystroke/ScriptTrigger
View gist:00a3885c88181bf98eb77f04eda4578c
Wenn [ Code(Get(TriggerKeystroke)) = 13 ]
---
hier Scriptfunktionen einfügen...
---
Ende (wenn)
@radarin
radarin / wp.customizer.css.php
Last active Feb 22, 2019
Wordpress Customizer Steuerung verbreitern
View wp.customizer.css.php
<?php
/* CSS im Cusomizer erweitern, Steuerelemente verbreitern */
add_action( 'customize_controls_print_styles', 'customizer_width_400', 999 );
function customizer_width_400() {
?>
<style>
#customize-controls {
width:400px;
max-width:400px;
}
@radarin
radarin / wp.place.menu.php
Last active Feb 12, 2019
Menu in Theme einfügen
View wp.place.menu.php
<?php
//
wp_nav_menu( array( 'theme_location' => 'additional-menu' ) );
//
wp_nav_menu( array( 'theme_location' => 'additional-menu', 'container_class' => 'new_menu_class' ) );
//
if (has_nav_menu( 'master-menu' )) {
wp_nav_menu( array('theme_location' => 'master-menu', 'items_wrap' => '<ul id="mainmenuentry">%3$s</ul>' ));
@radarin
radarin / wp.add.menu.php
Last active Feb 12, 2019
Neue Menuposition
View wp.add.menu.php
<?php
// Ein einzelnes Menu registrieren
add_action ('init', 'register_my_menus');
function register_my_menus() {
register_nav_menus(
/* Der erste Wert ist die Theme Location, der Zweite der Name im Backend */
array( 'master-menu' => __( 'Master Menu' ))
);
}
You can’t perform that action at this time.