Remove welcome panel from dashboard

It’s very easy to –permanent– remove the welcome panel from the dashboard. You can do it with this one single line. Place it in your functions.php
remove_action('welcome_panel', 'wp_welcome_panel');
Tips & tricks about Frontend and Wordpress
It’s very easy to –permanent– remove the welcome panel from the dashboard. You can do it with this one single line. Place it in your functions.php
remove_action('welcome_panel', 'wp_welcome_panel');
It’s easy to add a menu to your WordPress theme. It’s also easy to add the menu title.. You just got to know it 😉
// Add menu title to the template
echo "<h2>" . wp_get_nav_menu_name('nav-menu') . "</h2>";
// Add menu to the template
wp_nav_menu(
array('theme_location' => 'nav-menu')
);
A while back I came across some nice z-index articles. When using a z-index I mostly give it a high value. But what if we have a couple of z-indexes with high values…
With the following code it’s possible to have a good overview of all the elements which will be using a z-index.
$z-index: (
modal : 200,
share : 150,
navigation : 100,
footer : 90,
);
@function z-index($key) {
@return map-get($z-index, $key);
}
@mixin z-index($key) {
z-index: z-index($key);
}
Continue Reading… With scroll-margin-top it’s possible to automatically scroll before the selector.
h3 {
scroll-margin-top: 100px;
}
Continue Reading… To get some smooth scrolling on your page, just simply add the following code to your stylesheet. With this small piece of code the movement will be smooth instead of a more static behavior.
html {
scroll-behavior: smooth;
}
Continue Reading… Add the following code to only allow some Gutenberg blocks to your WordPress site.
add_filter('allowed_block_types', 'setAllowedBlocks');
function setAllowedBlocks($allowed_blocks) {
$allowed_blocks = array(
'core/image',
'core/paragraph',
'core/heading',
'core/list'
);
return $allowed_blocks;
}
Continue Reading…