Skip to content

Instantly share code, notes, and snippets.

View disable-caching-via-query-string
To disable caching on any single URL on a wpPERFORM-hosted site, just add the query string below
to the end of any URL:
?nocache=true
EXAMPLE:
https://wppperform.com/?nocache=true
View google-analytics-spam-filter
NOTES:
1. For the filter that includes hostnames, be sure to replace wpperform\.com with your domain name
2. The filters use regular expressions (regex), so be sure to understand proper regex before relying on data from a regex-based custom segment
3. Preview any custom segment to understand the results it will produce
4. If you have multiple properties in 1 Google Analytics account, you'll need to create a segment for each property
5. To prevent applying the wrong segment to a property, set the segment availability to only the current view
6. If you're logged into your Google Analytics account, you can easily download our segment by visiting in a new tab:
https://analytics.google.com/analytics/web/template?uid=cbiXy0ntRfigGby0TzCmKQ
View wpperform-tweetable-text
Parameters:
All parameters are optional.
alt = The text to tweet, which replaces the text between the opening and closing shortcodes
hashtag = A comma separated list of the hashtags to be appended to the tweet WITHOUT THE #
link = The link to be included in the tweet, which otherwise defaults to the post's permalink
via = Twitter user name to associate with the tweet WITHOUT THE @
Example 1: Basic usage
View wpperform-url-examples
# absolute URL loads using insecure HTTP protocol
http://wpperform.com/
# absolute URL loads using secure HTTPS
https://wpperform.com/
# protocol relative or protocol agnostic URL's
//wpperform.com/
//wpperform.com/relative-urls/
//www.mysite.com/
@wpperform
wpperform / gist:766a1c5db51a49c6a36a
Created May 22, 2014
wpPERFORM.com Tweet Button Shortcode Parameters
View gist:766a1c5db51a49c6a36a
[wpp-tweet via="wpperform" related="wpperform" text="You need to see this!" hashtag="somehashag,anotherone,yetanother" count="none" size="large"]
where ...
via = your Twitter username without the @
related = up to 2 related accounts
text = the tweet text, which will default to the post title, as adjusted for length
hashtag = a comma separated list of hashtags, without the # character
count = 1 of the following: none, horizontal, vertical (default = horizontal)
size = 1 of the following: medium, large
View wpperform_font_import.css
/*
Put all @import rules at the top of your custom CSS.
The first 3 examples below illustrate alternate options. Implement the 1 option that best suits your needs.
For more info on importing Google web fonts, see https://developers.google.com/fonts/docs/getting_started
*/
/* Example #1 - Load 1 Font In Its Default Weight
This loads the Oswald font but doesn't specify a weight, so its default weight loads.
Specifying the protocol (the HTTPS) is a good idea, and it's better to use a secure protocol.
@wpperform
wpperform / robots.txt
Last active Jan 27, 2016
wpPERFORM.com's recommended robots.txt file
View robots.txt
User-agent: *
Allow: /*.js*
Allow: /*.css*
Disallow: /*?
Disallow: /feed/
Disallow: */feed/
Disallow: /comments/
Disallow: */comments/
Disallow: /trackback/
Disallow: */trackback/
@wpperform
wpperform / page_prodtitle.php
Last active Dec 17, 2015
Page template for Themedy Clip Cart theme where products are sorted by title in ascending order
View page_prodtitle.php
<?php
/**
* Template Name: Products Sorted By Name
*
* Page template for Themedy Clip Cart theme tweaked by wpPERFORM
* Displays product archive in ascending name (title) order
*
* Note: The custom template can't be changed on a page with a slug of 'products'
*/
@wpperform
wpperform / genesis-footer-using-shortcodes
Created May 11, 2013
Genesis child theme footer using shortcodes
View genesis-footer-using-shortcodes
@wpperform
wpperform / studiopress-generate-box-demo
Last active Dec 17, 2015
Generate box for StudioPress Generate theme
View studiopress-generate-box-demo
<img src="http://generate.wpperform.com/wp-content/uploads/sites/13/2013/05/generatebox-badge.png" alt="" class="alignright" />
<p>Join over 155,000 people who get free and fresh content delivered automatically<br />
each time we publish. Your privacy and email address are safe with us!</p>
<form>
<input type="text" value="Enter your email address..." onfocus="if(this.value=='Enter your email address...'){this.value=''}" onblur="if(this.value==''){this.value='Enter your email address...'}" />
<input type="submit" value="Sign Up" />
</form>