Skip to content

Instantly share code, notes, and snippets.

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

LOOR Lab loorlab

💻
💥👩‍🚀👨‍🚀💥
View GitHub Profile
@loorlab
loorlab / .htaccess
Created August 26, 2015 19:41
Delete extension .html .php for url from server
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
ErrorDocument 404 site/404.php
@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 / 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 / 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' );
@loorlab
loorlab / include_post_on_static_external_pages_WP.php
Last active August 29, 2015 14:24
Solution: WordPress wp-blog-header.php custom page NetworkError: 404 Not Found via http://www.ballyhooblog.com/wordpress-wp-blog-header-php-custom-page-404/
<?php
/*
Example :
My Site : www.mysite.com (Site built in HTML)
My Blog : www.mysite.com/blog (Site built in WordPress)
Load Post on www.mysite.com from www.mysite.com/blog
Two types of solutions for Bug : NetworkError: 404 Not Found on Firebug
*/