Skip to content

Instantly share code, notes, and snippets.

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

LOOR Lab loorlab

💻
💥👩‍🚀👨‍🚀💥
View GitHub Profile
@loorlab
loorlab / kill-trackbacks.php
Last active August 29, 2015 14:25 — forked from chrisguitarguy/kill-trackbacks.php
Kill all WordPress pingback/trackback functionality
<?php
/*
Plugin Name: Kill Trackbacks
Plugin URI: http://pmg.co/category/wordpress
Description: Kill all trackbacks on WordPress
Version: 1.0
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
*/
@loorlab
loorlab / gist:3f92e196afa4481a4c65
Created September 17, 2015 01:51 — forked from johnkolbert/gist:769160
Unregisters a post type and removes the menu item
<?php
/*
* Usage for a custom post type named 'products':
* unregister_post_type( 'products' );
*
* Usage for the built in 'post' post type:
* unregister_post_type( 'post', 'edit.php' );
*/
if ( ! function_exists( 'products' ) ) :
@loorlab
loorlab / A.markdown
Created October 18, 2015 02:42 — forked from larrybotha/A.markdown
Custom social sharing icons
@loorlab
loorlab / wp-cheat-sheet
Created October 20, 2015 07:28
Wordpress cheat sheets
1. Theme Structure
- style file
style.css
- header section
header.php
- main section
index.php
@loorlab
loorlab / robots.txt
Created October 20, 2015 07:33
robots.txt for seo
User-agent: *
Allow: /
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins
Disallow: /wp-content/cache
Disallow: /wp-content/themes
Disallow: /feed
Disallow: /*/feed
@loorlab
loorlab / bootstrap-tabs.html
Created November 6, 2015 19:06 — forked from mnewt/bootstrap-tabs.html
bootstrap tabs example
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Le styles -->
<link href="../bootstrap/css/bootstrap.css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
</head>
<body>
@loorlab
loorlab / .htaccess
Created December 15, 2015 16:52 — forked from nathanhornby/.htaccess
Browser caching
<IfModule mod_mime.c>
AddType text/css .css
AddType text/x-component .htc
AddType application/x-javascript .js
AddType application/javascript .js2
AddType text/javascript .js3
AddType text/x-js .js4
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType image/svg+xml .svg .svgz
@loorlab
loorlab / Custom-Pagination
Last active July 21, 2022 14:02
Pagination for custom post template wordpress
<?php
//Add custom_pagination function in your function.php file
function custom_pagination($numpages = '', $pagerange = '', $paged='') {
if (empty($pagerange)) {
$pagerange = 2;
}
global $paged;
if (empty($paged)) {
$paged = 1;
@loorlab
loorlab / example1.php
Created January 7, 2016 21:33 — forked from ninetwentyfour/example1.php
Use WordPress’ is_page() To Display Custom Content - blogpost
<?php
if ( is_page('about')) {
echo '<div id="secondnav">This is the super cool secondary navigation.</div>';
}
?>
@loorlab
loorlab / change_recaptch_prompt.html
Created January 11, 2016 02:36 — forked from salsalabs/change_recaptch_prompt.html
Script to change the prompt for a reCaptcha object.
<script type="text/javascript">
// @see https://salsasupport.zendesk.com/entries/61500924
window.onload = function(){
var e = document.getElementById("recaptcha_response_field");
if (e != null) {
e.setAttribute("placeholder","Type what you see");
}
}
</script>