Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Valeriu Tihai valeriu

🎯
Focusing
View GitHub Profile
@valeriu
valeriu / class-wp-bootstrap-navwalker.php
Last active Nov 28, 2020 — forked from imuhammadshoaib/class-wp-bootstrap-navwalker.php
Make parent link clickable in Bootstrap for Desktop with WordPress NavWalker
View class-wp-bootstrap-navwalker.php
if (wp_is_mobile()){
$atts['href'] = '#';
$atts['data-toggle'] = 'dropdown';
$atts['aria-haspopup'] = 'true';
$atts['aria-expanded'] = 'false';
$atts['class'] = 'dropdown-toggle nav-link';
$atts['id'] = 'menu-item-dropdown-' . $item->ID;
} else {
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
$atts['aria-haspopup'] = 'true';
View woo.sql
//woocomerce table missing after wc uptate to 4.0.0
CREATE TABLE IF NOT EXISTS wp_wc_admin_notes (
note_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
name varchar(255) NOT NULL,
type varchar(20) NOT NULL,
locale varchar(20) NOT NULL,
title longtext NOT NULL,
content longtext NOT NULL,
icon varchar(200) NOT NULL,
View gist:5679217552968d50b0e2c140dc7ca822
http://ical-cdn.teamsnap.com/team_schedule/c132880d-10c3-47d4-b1ec-88fcfd7d14e3.ics
View gist:b839d9dc81c55b5da133c64a2c58b3ca
// Foundation for Sites Settings
// -----------------------------
//
// Table of Contents:
//
// 1. Global
// 2. Breakpoints
// 3. The Grid
// 4. Base Typography
// 5. Typography Helpers
View wp-logo+svg.php
<?php
/* -------------------------------------------------------------
* Custom Logo add this in "after_setup_theme" hook
* ============================================================*/
add_theme_support( 'custom-logo' );
/* -------------------------------------------------------------
* Enable svg support
* ============================================================*/
View ms IP
104.47.40.0/24
65.54.190.0/24
104.209.35.177/32
104.211.160.244/32
104.214.107.57/32
104.214.144.252/32
104.214.144.62/32
104.214.145.126/32
104.214.145.173/32
104.214.146.199/32
View gist:a577296e2962fc24e633f1e5d91f7e60
<style type="text/css">
.dropdown-menu {
border-bottom:1px solid red;
}
.current-nav-parent > .dropdown-menu{
border: 4px solid red;
}
.current-nav-parent > .dropdown-menu{border-bottom:0}
</style>
View wp-htaccess.sh
# Redirect http to https .htaccess
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
# Redirect http to https apache
<VirtualHost *:80>
ServerName www.example.com
View colorbtn.css
.btn-new-color {
background-image: linear-gradient(#DCA, #DDB);
border-color: #B5A0A0;
color: #4C3D3D !important;
&:hover {
background-color: #DDD8B6;
}
}
View help.php
change this:
<a href="http://voteformickey.com/cialis-30-mg.pdf">cialis 30 mg</a>
with this:
<a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>