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.
View GitHub Profile
@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="myemail@gmail.com" address="Warszawska XYZ abc" wojewodztwo="małopolskie"]
[card title="Oddział Główny" name="Andrzej Jędrzej" phone="111-111-222" email="jedrzej@gmail.com" address="Prosta 12/3" wojewodztwo="małopolskie"]
[card name="Michał Nowak" phone="111-222-000" email="emailmy@gmail.com" 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
@Mativve
Mativve / index.js
Created April 1, 2020 05:38
It's main file of electron filesystem.
const { app, BrowserWindow } = require('electron');
function createWindow (){
// Create the browser window.
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}