Skip to content

Instantly share code, notes, and snippets.

View Luisoncm's full-sized avatar
💻
Just coding

Luis Colomé Luisoncm

💻
Just coding
View GitHub Profile
<?php
/*
* Plugin Name: CF7 Optimization
* Version: 0.1
* Author: Luis Colomé
* Author URI: https://luiscolome.com
*/
// By default don't load the script o style sheet.
add_filter( 'wpcf7_load_js', '__return_false' );
add_filter( 'wpcf7_load_css', '__return_false' );
@Luisoncm
Luisoncm / functions.php
Last active April 12, 2018 13:53
Get rid of the commas between tags
<?php
/* Don't paste me
*
*
* Modify the meta info on post footer
*/
add_filter( 'genesis_post_meta', 'lc_post_meta_filter' );
function lc_post_meta_filter( $post_meta ) {
// where do we apply the filter
// When the document is ready...
jQuery( document ).ready( function( $ ) {
// ... display the Full Screen search when:
// 1. The user focuses on a search field, or
// 2. The user clicks the Search button
// 3. The user clicks on a custom link with '#search' as a url
$( 'form[role=search] input, form[role=search] button, a[href="#search"]' ).on( 'focus, click', function( event ) {
// Prevent the default action
event.preventDefault();