Skip to content

Instantly share code, notes, and snippets.

View gspice's full-sized avatar

Ginger Coolidge gspice

  • GSC Solutions LLC
  • Lincoln City, Oregon
View GitHub Profile
<?php
// Don't include the above <?php when copying
add_filter( 'wp_nav_menu_items', 'prefix_primary_nav_extras', 10, 2 );
/**
* Filter menu items, appending either a search form or today's date.
*
* @param string $menu HTML string of list items.
* @param stdClass $args Menu arguments.
@gspice
gspice / APL-property-details-filter
Created August 10, 2014 16:39
AgentPress Listings filter to change property details
//* Filter the property details array
add_filter( 'agentpress_property_details', 'agentpress_property_details_filter' );
function agentpress_property_details_filter( $details ) {
$details['col1'] = array(
__( 'Price:', 'agentpress' ) => '_listing_price',
__( 'Address:', 'agentpress' ) => '_listing_address',
__( 'City:', 'agentpress' ) => '_listing_city',
__( 'State:', 'agentpress' ) => '_listing_state',
__( 'ZIP:', 'agentpress' ) => '_listing_zip',
<?php
/**
* Simple Grid helper functions.
*
* @package SimpleGrid
* @subpackage Genesis
* @copyright Copyright (c) 2013, Flagship, LLC
* @license GPL-2.0+
* @since 2.0.0
*/
<link href="http://www.yoursite.com/apple-touch-icon.png" rel="apple-touch-icon"/>
<link href="http://www.yoursite.com/apple-touch-icon-76x76.png" rel="apple-touch-icon" sizes="76x76"/>
<link href="http://www.yoursite.com/apple-touch-icon-120x120.png" rel="apple-touch-icon" sizes="120x120"/>
<link href="http://www.yoursite.com/apple-touch-icon-152x152.png" rel="apple-touch-icon" sizes="152x152"/>
//* Filter the property details array
add_filter( 'agentpress_property_details', 'agentpress_property_details_filter' );
function agentpress_property_details_filter( $details ) {
$details['col1'] = array(
__( 'Price:', 'agentpress' ) => '_listing_price',
__( 'Address:', 'agentpress' ) => '_listing_address',
__( 'City:', 'agentpress' ) => '_listing_city',
__( 'State:', 'agentpress' ) => '_listing_state',
__( 'ZIP:', 'agentpress' ) => '_listing_zip',
<?php
//* Do NOT include the opening php tag
//* Remove comment form allowed tags
add_filter( 'comment_form_defaults', 'bg_remove_comment_form_allowed_tags' );
function bg_remove_comment_form_allowed_tags( $defaults ) {
$defaults['comment_notes_after'] = '';
return $defaults;
@gspice
gspice / gist:d5a8d8567041ef64a304
Created September 18, 2014 15:09
Gist CSS Formatting Overrides
/*
Gist Formatting Overrides
---------------------------------------------------------------------------------------------------- */
.gist {
font-size: 14px;
}
.gist table {
line-height:1;
}
@gspice
gspice / archive-listing.php
Last active August 29, 2015 14:08
Simple template to show AgentPress Listings search results after changes to WP 4.0 made it default to search.php
<?php
/**
* This file adds an AgentPress Listings custom post type archive template to the Winning Agent Pro Theme.
*
* @author Ginger Coolidge
* @package Winning Agent Pro
* @subpackage Customizations
*/
@gspice
gspice / wap-header-vertical-adj
Last active August 29, 2015 14:11
CSS to tweak for logo and menu vertical adjustments in Winning Agent Pro when using a logo image in the header.
Reducing the value 164px below to something less will bring the photo up
.header-image .site-title a {
background-position: left center !important;
float: left;
min-height: 164px;
width: 100%;
}
Changing the 40px on the padding value below will let you adjust the vertical placement
@gspice
gspice / add-category-cpt
Created December 9, 2014 21:47
Change in functions file will add category support to Community custom post type
function reg_cat() {
register_taxonomy_for_object_type('category','wap-community');
}
add_action('init', 'reg_cat');