Skip to content

Instantly share code, notes, and snippets.

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

LOOR Lab loorlab

💻
💥👩‍🚀👨‍🚀💥
View GitHub Profile
@loorlab
loorlab / Google Chrome (browser) CSS Hack
Created October 18, 2016 03:52 — forked from kiennt2/Google Chrome (browser) CSS Hack
Google Chrome (browser) CSS Hack
I can't test it on safari/mac but Safari and Google Chrome uses WebKit rendering engine so it is very likely that every hack works in Safari.
Google Chrome is rather new player but it rapidly increases and there is a need for using specific styles only for that browser. Thats why i am looking for hack for Google Chrome.
Hack 1: @media and -webkit-min-device-pixel-ratio
Testsuite: This text is red in Google Chrome.
This hack uses webkit specific feature.
/* will be red only in google chrome */
@loorlab
loorlab / GoBackButton.php
Created November 24, 2016 20:59 — forked from khoerodin/GoBackButton.php
Go Back Button
<?php
$url = htmlspecialchars($_SERVER['HTTP_REFERER']);
echo "<a href='$url'>go back</a>";
?>
@loorlab
loorlab / genesis_remove_shiv.php
Created December 22, 2016 19:39 — forked from brycejacobson/genesis_remove_shiv.php
Remove html5 shiv from Genesis and add Modernizr instead
<?php
//* Do NOT include opening php tag
//* Remove Genesis hmlt5 shiv and add Modernizr instead
remove_action( 'wp_head', 'genesis_html5_ie_fix' );
add_action( 'wp_head', 'add_mondernizr' );
function add_mondernizr() {
if ( ! genesis_html5() )
return;
@loorlab
loorlab / functions.php
Last active April 22, 2017 09:29 — forked from Komock/function.php
Genesis remove .site-inner markup
<?php
//* Remove .site-inner - All Site
add_filter( 'genesis_markup_site-inner', '__return_null' );
add_filter( 'genesis_markup_content-sidebar-wrap_output', '__return_false' );
add_filter( 'genesis_markup_content', '__return_null' );
//* Remove .site-inner - Only Home Page
function thmeprefix_remove_homepage_content() {
if ( is_front_page() ) {
add_filter( 'genesis_markup_site-inner', '__return_null' );
@loorlab
loorlab / functions.php
Created June 3, 2017 05:43
Customize site footer with the Genesis Framework.
<?php
//* Do NOT include the opening php tag
//* Remove the site footer
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
//* Customize the site footer
add_action( 'genesis_footer', 'bg_custom_footer' );
@loorlab
loorlab / .gitignore
Created June 30, 2017 03:03 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@loorlab
loorlab / cf7.css
Last active March 23, 2018 08:20 — forked from codehandling/cf7.css
Contact Form 7 Styles
/***********basic************/
/*Form width*/
.wpcf7 {
text-align: left;
width: 40%;
}
/*Input Field widths*/
.wpcf7-text, .wpcf7-textarea {
@loorlab
loorlab / disable_comments_WP.php
Last active November 29, 2017 20:01 — forked from mattclements/function.php
Wordpress Disable Comments (add to functions.php)
<?php
// Add to existing functions.php file
// Disable support for comments and trackbacks in post types
function df_disable_comments_post_types_support() {
$post_types = get_post_types();
foreach ($post_types as $post_type) {
if(post_type_supports($post_type, 'comments')) {
remove_post_type_support($post_type, 'comments');
@loorlab
loorlab / custom-search-form.php
Created December 1, 2017 06:05 — forked from awakekat/custom-search-form.php
Wordpress Custom Search Form
custom-search-form.php
============================================
<div class="content-search">
<form role="search" method="get" id="searchform" class="searchform" action="<?php echo get_site_url(); ?>">
<div>
<label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
<?php wp_dropdown_categories( array(