Skip to content

Instantly share code, notes, and snippets.

View jonbellah's full-sized avatar

Jon Bellah jonbellah

View GitHub Profile
@jonbellah
jonbellah / keybase.md
Created October 30, 2020 15:24
keybase.md

Keybase proof

I hereby claim:

  • I am jonbellah on github.
  • I am jonbellah (https://keybase.io/jonbellah) on keybase.
  • I have a public key ASCPMyKtVVyosB5WWo43a8GV7FNt3he1jY5TH5Qjs1H7QAo

To claim this, I am signing this object:

@jonbellah
jonbellah / style.css
Created May 22, 2014 13:01
Style input placeholder
::-webkit-input-placeholder { /* WebKit browsers */
color: #3498db;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #3498db;
opacity: 1;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #3498db;
opacity: 1;
@jonbellah
jonbellah / style.css
Created May 21, 2014 14:32
Multiple Background Images
body {
background: url(image3.png) 10px 10px no-repeat, /* On top, like z-index: 3; */
url(image2.png) 10px 10px no-repeat, /* like z-index: 2; */
url(image1.png); /* On bottom, like z-index: 1; */
}
@jonbellah
jonbellah / gist:1c2b25c9e511a1f3c19e
Last active August 29, 2015 14:01
bootstrap nav walker header
<header id="masthead" class="site-header navbar" role="banner" itemscope="itemscope" itemtype="http://schema.org/WPHeader">
<div class="container">
<div class="row">
<div class="navbar-header">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home" class="navbar-brand"><?php bloginfo( 'name' ); ?></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<?php /* Primary navigation */
wp_nav_menu( array(
@jonbellah
jonbellah / gist:b1711dcee0bed9651c6e
Last active August 29, 2015 14:01
include bootstrap nav walker
// Register Bootstrap Navigation Walker
require get_template_directory_uri() . '/wp_bootstrap_navwalker.php';
@jonbellah
jonbellah / gist:b1c27114628680dd25b1
Last active August 29, 2015 14:01
Password Protect WordPress
/**
* Redirect non logged in users to the login page
*/
if ( !is_user_logged_in() ) {
wp_redirect( wp_login_url() );
exit;
}
@jonbellah
jonbellah / functions.php
Last active January 4, 2016 08:49
Custom Admin Styles in WordPress
function my_custom_admin_styles() {
echo '<style type="text/css">
.your-custom-css {
height: 300px;
overflow: scroll;
border: 1px solid #ddd;
padding: 15px;}
</style>';
}
add_action('admin_head', 'my_custom_admin_styles');
@jonbellah
jonbellah / functions.php
Created August 12, 2013 19:16
Add Publisher Code
function add_google_publisher_tag() { ?>
// Your <link rel="publisher"> tag
<?php }
add_action( 'wp_enqueue_scripts', 'add_google_publisher_tag' );
@jonbellah
jonbellah / header.php
Created August 9, 2013 14:59
jQuery Dropdown Menu - The HTML
<nav id="navigation" class="site-navigation" role="navigation">
<ul id="menu-primary" class="menu">
<li class="menu-item"><a href="#">News</a></li>
<li class="menu-item"><a href="#">Snippets</a>
<ul class="dropdown">
<li class="menu-item sub-menu"><a href="#">CSS</a></li>
<li class="menu-item sub-menu"><a href="#">HTML</a></li>
<li class="menu-item sub-menu"><a href="#">jQuery</a></li>
<li class="menu-item sub-menu"><a href="#">PHP</a></li>
<li class="menu-item sub-menu"><a href="#">WordPress</a></li>
@jonbellah
jonbellah / gist:6140304
Created August 2, 2013 14:31
Deregister jQuery with wp_deregister_script
function theme_deregister_scripts() {
wp_deregister_script( 'jquery' );
}
add_action( 'wp_enqueue_scripts', 'theme_deregister_scripts' );