Skip to content

Instantly share code, notes, and snippets.

@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@ocean90
ocean90 / box-shadow.html
Last active April 11, 2024 13:54
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
@lmartins
lmartins / genesis_attr_add_class.php
Last active September 20, 2022 13:33 — forked from JiveDig/genesis_attr_add_class.php
Add classes and attributes to any element in Genesis
<?php
//* Add class to .site-container
add_filter('genesis_attr_site-container', 'jive_attributes_st_container');
function jive_attributes_st_container($attributes) {
$attributes['class'] .= ' st-container';
return $attributes;
}
//* Add class to .site-inner
@nickcernis
nickcernis / mailchimp-popup-for-wordpress.md
Last active July 28, 2022 14:49
MailChimp Popup Script that works with WordPress sites

MailChimp's default popup scripts can break on WordPress sites that use jQuery/jQuery UI unless you include their embed code as the final elements before the closing body tag.

Including them in this way isn't always possible or easy with WordPress.

The code below is an alternative implementation of the loader that forces MailChimp's popup scripts to appear below all other scripts upon page load.

To use it, modify the baseUrl, uuid, and lid attributes with the ones from the original popup script that MailChimp supplies.

@neilgee
neilgee / a-cpt.php
Last active July 27, 2022 14:05
CPT (Custom Post Type) - WordPress Plugin - there are 2 snippets here - the one name - cpt-hide.php hides the single and archive views, the other one is normal
<?php
/*
Plugin Name: Testimonials Custom Post Type
Plugin URI: http://wpbeaches.com/create-custom-post-types-in-genesis-child-theme-in-wordpress/
Description: Testimonials Custom Post Types
Author: Neil Gowran
Version:1.0.0
Author URI:http://wpbeaches.com
*/
@benweiser
benweiser / Add A Genesis Featured Image Above Post With Title
Last active December 31, 2021 12:15
Add A Genesis Featured Image Above Post With Title - Functions.php
// Hook after header area
add_action( 'genesis_after_header', 'bw_featured_image_title' );
function bw_featured_image_title() {
// If it is a page and has a featured thumbnail, but is not the front page do the following...
if (has_post_thumbnail() && is_single() ) {
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
@grtaylor2
grtaylor2 / Change Read More Text Genesis WordPress
Last active August 11, 2021 19:53
Change the [Read More] Text in Genesis WordPress Child Theme
/** Customize Read More Text */
add_filter( 'excerpt_more', 'child_read_more_link' );
add_filter( 'get_the_content_more_link', 'child_read_more_link' );
add_filter( 'the_content_more_link', 'child_read_more_link' );
function child_read_more_link() {
return '<a href="' . get_permalink() . '" rel="nofollow">CUSTOMIZE YOUR TEXT HERE</a>';
}
@billerickson
billerickson / genesis-custom-loop-pagination.php
Created July 31, 2012 15:59
Genesis custom loop with pagination
<?php
/* Template Name: Test */
/**
* Genesis custom loop
*/
function be_custom_loop() {
global $post;
// arguments, adjust as needed
@ozzyrod
ozzyrod / responsive-menu-css.css
Last active April 23, 2019 05:54
Creates a mobile responsive menu in a Genesis child theme with support for collapsible sub menus.
/* Responsive Navigation
---------------------------------------------------------------------------------------------------- */
/* Standard Navigation
--------------------------------------------- */
nav {
clear: both;
}
@About2git
About2git / gist:79e5e1cd2d90e1539f1e
Created February 14, 2015 16:56 — forked from srikat/gist:7867185
How to set up Sticky Header or Navigation in Genesis
/* Sticky header */
.site-header {
position: fixed;
width: 100%;
z-index: 1000;
}
nav.nav-primary {
padding-top: 164px; /*height of header (can be easily obtained using Firebug)*/