Skip to content

Instantly share code, notes, and snippets.

View surefirewebserv's full-sized avatar

Jonathan Perez surefirewebserv

View GitHub Profile
@surefirewebserv
surefirewebserv / StripURI.php
Last active December 11, 2015 11:39
This snippet strips the URI of the web address no matter what page your on. Then adds a meta description according to that page name. So in the case of 'connect' the web page would actually be www.sitename.com/whatever/connect.php and anything you put within that case, would only effect that page.
<?php
$thisPage = $_SERVER["REQUEST_URI"];
function get_page_name ( $page )
{
$array = explode( "/", $page );
for ( $i = 0; $i < count( $array ); $i++ )
{
$name = $array[ $i ];
}
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700);
body,
h1,
h2,
h2 a,
h2 a:visited,
h3,
h4,
@surefirewebserv
surefirewebserv / postsubmit.js
Created November 8, 2012 21:15
Ajax Post Submit
$("#submit").click(function() {
$.post("add.php", $("#addform").serialize());
});
@surefirewebserv
surefirewebserv / simple-genesis-homepage.php
Last active April 16, 2019 14:22
Simple Homepage Layout for Genesis Framework.
<?php
add_action( 'genesis_after_header', 'sf_featured_slideshow' );
/**
* Add slide show widget area after the header.
*
* @author Sure Fire Web Services
* @link http://surefirewebservices.com/?p=1542
*
* @return Return null if not the homepage post.
*/
@surefirewebserv
surefirewebserv / gist:3795553
Created September 27, 2012 18:26
Array for Structural Wraps
if ($gs_theme_support_functions['three']) {
$gs_structural_wrap = of_get_option('gs_structural_wraps', 'none' );
add_theme_support( 'genesis-structural-wraps', array_keys($gs_structural_wrap, 1) );
}