Skip to content

Instantly share code, notes, and snippets.

View loorlab's full-sized avatar
💻
💥👩‍🚀👨‍🚀💥

LOOR Lab loorlab

💻
💥👩‍🚀👨‍🚀💥
View GitHub Profile
@loorlab
loorlab / useragentswitcher.xml
Created February 9, 2015 01:29
useragentswitcher.xml
<useragentswitcher><folder description="Internet Explorer"><useragent description="Internet Explorer 6" useragent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" appcodename="Mozilla" appname="Microsoft Internet Explorer" appversion="4.0 (compatible; MSIE 6.0; Windows NT 5.1)" platform="Win32" vendor="" vendorsub=""/><useragent description="Internet Explorer 7" useragent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)" appcodename="Mozilla" appname="Microsoft Internet Explorer" appversion="4.0 (compatible; MSIE 7.0; Windows NT 6.0)" platform="Win32" vendor="" vendorsub=""/><useragent description="Internet Explorer 8" useragent="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)" appcodename="Mozilla" appname="Microsoft Internet Explorer" appversion="4.0 (compatible; MSIE 8.0; Windows NT 6.1)" platform="Win32" vendor="" vendorsub=""/></folder><folder description="Search Robots"><useragent description="Googlebot 2.1" useragent="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" a
@loorlab
loorlab / .htaccess
Last active October 23, 2021 22:18
.htaccess WordPress - 2017 *Use it according to your server and your preferences.* // In the next line change this name --> Header set X-Powered-By "LOOR Lab" --> for which you want to use. DO NOT COPY\PASTE. Take only what you need carefully. The following code is just a few **examples** of optimizations that you can do in .htaccess file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
@loorlab
loorlab / emoji.php
Last active August 29, 2015 14:20
Disable Emoji support & Styles WordPress
<?php
// Disable Emoji support & Styles
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
?>
@loorlab
loorlab / random-div
Created May 13, 2015 04:50
Random DIV with jQuery 2.1.3 DEMO : http://jsfiddle.net/jBzB4/118/
HTML
<div id="container-mov">
<div id="cammov1" class="swiper-slide">SLIDE 1</div>
<div id="cammov2" class="swiper-slide">SLIDE 2</div>
<div id="cammov3" class="swiper-slide">SLIDE 3</div>
<div id="cammov4" class="swiper-slide">SLIDE 4</div>
<div id="cammov5" class="swiper-slide">SLIDE 5</div>
<div id="cammov6" class="swiper-slide">SLIDE 6</div>
@loorlab
loorlab / style.css
Last active August 29, 2015 14:21
Theme Child WP style.css : https://codex.wordpress.org/Child_Themes
/*
Theme Name: Twenty Fifteen Child
Theme URI: http://example.com/twenty-fifteen-child/
Description: Twenty Fifteen Child Theme
Author: John Doe
Author URI: http://example.com
Template: twentyfifteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@loorlab
loorlab / functions.php
Created May 15, 2015 02:37
functions.php for Theme Child WP
<?php
add_action( 'wp_enqueue_scripts', 'wpsites_load_parent_styles');
function wpsites_load_parent_styles() {
wp_enqueue_style( 'parent-styles', get_template_directory_uri().'/style.css' );
}
@loorlab
loorlab / delete.php
Last active September 30, 2018 18:00
Delete File/Folder Persistent CHMOD 777
<?php
function rchmod($parent, $dmod, $fmod) {
if (is_dir($parent)) {
$old = umask(0000);
chmod($parent, $dmod);
umask($old);
if ($handle = opendir($parent)) {
while (($file = readdir($handle)) !== false) {
if ($file === "." or $file === "..") {
continue;
@loorlab
loorlab / change-width
Last active August 29, 2015 14:22
Change width while img {width:100%} on CSS
<a><img style="width:auto;max-width:100%" src="" alt="" /></a>
@loorlab
loorlab / link_parent_dropdown_bootstrap.js
Last active August 29, 2015 14:23
Link parent for Dropdown menu on Bootstrap
@loorlab
loorlab / config_navigation_paged_WP.php
Created July 13, 2015 17:18
Display blog posts on page with navigation on WordPress via https://digwp.com/2013/01/display-blog-posts-on-page-with-navigation/ - Insert into functions.php FIX Error www.site.com/blog/page/2/ Page Not Found On WordPress
<?php
/**
* Config Navigation.
*/
function digwp_filter_pre_get_posts( $query ) {
if ( is_home() && $query->is_main_query() ) {
$query->set( 'posts_per_page', '5' );
}
}
add_action( 'pre_get_posts', 'digwp_filter_pre_get_posts' );