Skip to content

Instantly share code, notes, and snippets.

View landru247's full-sized avatar

Landru landru247

  • Earth
View GitHub Profile
@landru247
landru247 / CSS: responsive text.css
Created January 28, 2014 23:20
CSS: responsive text - Percentage based
html { font-size: 100%; }
body { line-height: 1.6875; font-family: 'Lato', arial, helvetica, sans-serif; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: 'Bitter', arial, helvetica, sans-serif; font-weight: 700; margin-top: 0; line-height: 1.1; }
h1 { font-size: 200%; }
h2 { font-size: 180%; }
h3 { font-size: 160%; }
h4 { font-size: 120%; }
h5 { font-size: 100%; }
h6 { font-size: 80%; }
p { color: #666; font-size: 100%; font-weight: 500; margin-bottom: 5%; }
@landru247
landru247 / CSS: Menu Caret.css
Created December 10, 2013 22:06
CSS: Menu Caret - extends bootsrap3 dropdown menu w/top caret
.dropdown-menu:after {
border-bottom: 6px solid #3F3F3F;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
content: "";
display: inline-block;
left: 43px;
position: absolute;
top: -6px;
}
@landru247
landru247 / AFC- Options Plugin.php
Created December 10, 2013 18:45
AFC- Options Plugin - menu/tab page naming
function my_acf_options_page_settings( $settings )
{
$settings['title'] = 'My Options Title';
$settings['pages'] = array('Items', 'Trinkets', 'Gadgets’);
return $settings;
}
add_filter('acf/options_page/settings', 'my_acf_options_page_settings');
@landru247
landru247 / htaccess: Boilerplate
Created December 6, 2013 22:36
htaccess: Boilerplate
# BEGIN HTML5 Boilerplate
###
### This contains the HTML5 Boilerplate .htaccess that can be found at:
### https://github.com/h5bp/server-configs/blob/master/apache/.htaccess
###
### Added:
### Block access to WordPress files that reveal version information.
###
### Removed:
@landru247
landru247 / htaccess: - Theme re-write rules
Created December 6, 2013 22:35
htaccess: - Theme re-write rules
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^assets/css/(.*) /wp-content/themes/themeName/assets/css/$1 [QSA,L]
RewriteRule ^assets/js/(.*) /wp-content/themes/themeName/assets/js/$1 [QSA,L]
RewriteRule ^assets/img/(.*) /wp-content/themes/themeName/assets/img/$1 [QSA,L]
RewriteRule ^plugins/(.*) /wp-content/plugins/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
@landru247
landru247 / CSS: Footer Stick.css
Created December 2, 2013 22:45
CSS: Footer Stick
@landru247
landru247 / Social Linking.php
Created November 21, 2013 19:42
Social Linking: This is for a quick implementation of social sharing without using any API keys, or needing any extra scripting.
Twitter
Example Link
https://twitter.com/intent/tweet?button_hashtag=TwitterStories&text=My%20story%20is%20about%20what%20is%20happening%20today&url=https%3A%2F%2Fdev.twitter.com
Documentation
https://dev.twitter.com/docs/tweet-button
Google+
Example Link
@landru247
landru247 / WordPress: Custom Log in.php
Created November 13, 2013 22:56
WordPress: Custom Log in
Add:
A Login folder to your theme
wp-content > themes > themeName > login.
Add: To functions.php (or custom.php in Roots)
// redirects to a custom stylsheet
function custom_login_css() {
echo '<link rel="stylesheet" type="text/css" href="'.get_stylesheet_directory_uri().'/login/login-styles.css" />';
@landru247
landru247 / CSS: Animation Transitions.css
Created November 11, 2013 05:19
CSS: Animation Transitions - Just scroll through there are many to choose from (see; https://daneden.me/animate/ for demos)
.animated{-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:1s;-moz-animation-duration:1s;-ms-animation-duration:1s;-o-animation-duration:1s;animation-duration:1s;}.animated.hinge{-webkit-animation-duration:1s;-moz-animation-duration:1s;-ms-animation-duration:1s;-o-animation-duration:1s;animation-duration:1s;}@-webkit-keyframes flash {
0%, 50%, 100% {opacity: 1;} 25%, 75% {opacity: 0;}
}
@-moz-keyframes flash {
0%, 50%, 100% {opacity: 1;}
25%, 75% {opacity: 0;}
}
@-o-keyframes flash {
@landru247
landru247 / WordPress: WP Dashboard Meta box.php
Last active December 27, 2015 10:29
WordPress: WP Dashboard Meta box - adds a function that creates a "default" created by LevyOnline Meta box to WP Dashboard
// CUSTOM DASHBOARD WIDGET
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
function my_custom_dashboard_widgets() {
global $wp_meta_boxes;
wp_add_dashboard_widget('custom_help_widget', 'Trademark Creative Ltd.', 'custom_dashboard_help');
}