Skip to content

Instantly share code, notes, and snippets.

View timothyjensen's full-sized avatar

Tim Jensen timothyjensen

View GitHub Profile
<?php
add_filter( 'enter_title_here', function( $title ) {
$screen = get_current_screen();
if ( 'your_custom_post_type' == $screen->post_type ){
$title = 'Your custom placeholder text';
}
return $title;
@timothyjensen
timothyjensen / contact.html
Created April 23, 2017 19:39 — forked from atcraigwatson/contact.html
Bootstrap Ajax Contact Form
<form id="contact-form" method="post" action="mailer.php" role="form">
<div class="messages"></div>
<div class="controls">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="form_name">Firstname *</label>
@timothyjensen
timothyjensen / outside-structural-wrap.php
Last active March 24, 2017 22:20 — forked from hellofromtonya/before-structural-wrap.php
Insert HTML before or after the Genesis structural wrap for the given contextual area.
<?php
add_action( 'genesis_meta', 'process_structural_wrap_handler' );
/**
* Process the structural wrap handler.
*
* @since 1.0.0
*
* @return void
*/
function process_structural_wrap_handler() {
@timothyjensen
timothyjensen / parallax.js
Created May 30, 2016 00:20 — forked from srikat/parallax.js
Applying Parallax effect from Parallax Pro in any Genesis theme. http://sridharkatakam.com/apply-parallax-effect-parallax-pro-genesis-theme/
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'parallax-section-below-header',
'name' => __( 'Parallax Section Below Header', 'your-theme-slug' ),
'description' => __( 'This is the parallax section below header.', 'your-theme-slug' ),
) );
genesis_register_sidebar( array(
'id' => 'parallax-section-above-footer',
'name' => __( 'Parallax Section Above Footer', 'your-theme-slug' ),
@timothyjensen
timothyjensen / header-url.php
Last active February 16, 2016 20:31 — forked from studiopress/header-url.php
Genesis header.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Modify the header URL - XHTML Version
add_filter('genesis_seo_title', 'sp_seo_title', 10, 3);
function sp_seo_title($title, $inside, $wrap) {
$inside = sprintf( '<a href="http://www.yourdomain.com" title="%s">%s</a>', esc_attr( get_bloginfo('name') ), get_bloginfo('name') );
$title = sprintf('<%s id="title">%s</%s>', $wrap, $inside, $wrap);
return $title;
}