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
@gspice
gspice / sorry-no-posts-match-criteria.css
Created January 11, 2015 22:32
Replacing "Sorry, no posts match your criteria" message with something else. Works on archive-listing.php template for AgentPress Listings search results.
/** Change Text Shown When No Posts Are Found */
add_filter('genesis_noposts_text', 'eo_noposts_text');
function eo_noposts_text($text)
{
$text = '<span class="noposts-text">' . __('Your request did not return any results, please check back later.', 'eo') . '</span>';
return $text;
}
//If you want to style the text that is displayed just add some styles in the style-sheet for .noposts-text.
@gspice
gspice / supress-wap-featured-image-per-page.php
Last active August 29, 2015 14:13
WAP inserts the featured image into the content automatically unless otherwise excluded
@gspice
gspice / wap-full-width-increase
Last active August 29, 2015 14:13
wap - widen full page layout
//look for this
.full-width-content .content
//and changed the width from 740px to be something wider. The max width is 1140px.
//what i sent
On your site, when I use Inspect Element, I see this section of code:
/* Site Containers
--------------------------------------------- */
@gspice
gspice / wap-search-home-only
Created January 10, 2015 20:22
wap search bar to appear only on the home page
// Add search widget below header.
add_action( 'genesis_after_header', 'wap_search_bar' );
function wap_search_bar() {
// bail if we're not on the front page
if ! is_front_page() {
return;
}
@gspice
gspice / wap-home-shading
Created January 10, 2015 20:18
Adjust semi-transparent black overlay on the home page image that you can either tone down or get rid of completely.
.home-welcome {
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, .4);
}
.home .search-bar {
background-color: rgb(0, 0, 0);
background: rgba(0, 0, 0, .4);
}
@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');
@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 / 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 / gist:d5a8d8567041ef64a304
Created September 18, 2014 15:09
Gist CSS Formatting Overrides
/*
Gist Formatting Overrides
---------------------------------------------------------------------------------------------------- */
.gist {
font-size: 14px;
}
.gist table {
line-height:1;
}
<?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;