Skip to content

Instantly share code, notes, and snippets.

View Mativve's full-sized avatar
⌨️
Coding is my life.

Mateusz Świder Mativve

⌨️
Coding is my life.
  • Poland
  • 17:38 (UTC +01:00)
View GitHub Profile
/*!
* Select2 v4 Bootstrap 5 theme v1.3.0
*/.select2-container--bootstrap-5{display:block}select+.select2-container--bootstrap-5{z-index:1}.select2-container--bootstrap-5 :focus{outline:0}.select2-container--bootstrap-5 .select2-selection{width:100%;min-height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-family:inherit;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.select2-container--bootstrap-5 .select2-selection{transition:none}}.select2-container--bootstrap-5.select2-container--focus .select2-selection,.select2-container--bootstrap-5.select2-container--open .select2-selection{border-color:#86b7fe;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.select2-container--bootstrap-5.select2-container--open.select2-container--below .select2-selection{border-bo
@Mativve
Mativve / scrimGradientOpacity.scss
Created January 17, 2024 15:02
Scrim Gradient with opacity
@mixin scrimGradient($startColor: $color-black, $direction: 'to bottom') {
$scrimCoordinates: (0: 1,
19: 0.738,
34: 0.541,
47: 0.382,
56.5: 0.278,
65: 0.194,
73: 0.126,
80.2: 0.075,
@Mativve
Mativve / style.scss
Created February 14, 2023 22:46
WordPress widgets style - SCSS
.widget{
// Links widget
&_links{
ul{
}
li{
@Mativve
Mativve / style.css
Created October 10, 2022 11:11
OceanWP naprawa wysokości zdjęć i kategorii
.product-category a:empty{
display:none !important;
}
.image-wrap{
height:300px;
}
.image-wrap .woo-entry-image, .product-category .woo-entry-image{
height:300px;
}
.image-wrap .woo-entry-image > a:first-child, .product-category .woo-entry-image > a:first-child{
@Mativve
Mativve / WordPress Theme Customizer Sample.php
Last active September 13, 2022 18:29 — forked from Abban/WordPress Theme Customizer Sample.php
WordPress Theme Customizer Sample
<?php
function themename_customize_register($wp_customize){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));
// =============================
@Mativve
Mativve / README.md
Last active October 1, 2021 22:22
WordPress - mapa kontaktów z podziałem na województwa

Skrypt ten dodajemy albo do swojego motywu w pliku functions.php lub przy pomocy wtyczki, która rozszerza taką możliwość np.: https://pl.wordpress.org/plugins/my-custom-functions/

Mapkę umieszczamy w treści strony/posta przy pomocy odpowiednich shortcode'ów w następujący sposób:

[map]
[card title="Oddział Główny" name="Adam Kowalski" phone="000-111-222" email="[email protected]" address="Warszawska XYZ abc" wojewodztwo="małopolskie"]
[card title="Oddział Główny" name="Andrzej Jędrzej" phone="111-111-222" email="[email protected]" address="Prosta 12/3" wojewodztwo="małopolskie"]
[card name="Michał Nowak" phone="111-222-000" email="[email protected]" address="Krakowska XYZ abc" wojewodztwo="pomorskie"]
@Mativve
Mativve / functions.php
Created August 18, 2021 16:31
This code disable the block editor
<?php
//
// ByeByeGutenberg
//
// Disables the block editor from managing widgets in the Gutenberg plugin.
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false', 100 );
// Disables the block editor from managing widgets.
add_filter( 'use_widgets_block_editor', '__return_false' );
?>
@Mativve
Mativve / functions.php
Last active June 29, 2021 10:50
Yoast SEO Show all product category & shop page in product category
<?php
//
// Yoast SEO Show all product category & Shop page in product category
//
function wpseo_show_all_categories( $this_crumbs ){
if( is_product() ){
$last = $this_crumbs[ count($this_crumbs)-1 ];
$terms = get_the_terms( $last['id'], 'product_cat' );
@Mativve
Mativve / functions.php
Last active April 16, 2021 18:40
WordPress adding custom columns to custom post types
<?php
// Add the custom columns to the book post type:
add_filter( 'manage_<post_type>_posts_columns', 'set_custom_edit_<post_type>_columns' );
function set_custom_edit_<post_type>_columns($columns) {
unset( $columns['author'] );
$columns['column_name'] = __( 'Column name', 'text-domain' );
return $columns;
}
@Mativve
Mativve / add-wordpress-settings-page.php
Created January 21, 2021 17:12 — forked from DavidWells/add-wordpress-settings-page.php
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters