Skip to content

Instantly share code, notes, and snippets.

View mjepson's full-sized avatar

Magnus Jepson mjepson

View GitHub Profile
<?php
/**
* Custom WordPress configurations on "wp-config.php" file.
*
* This file has the following configurations: MySQL settings, Table Prefix, Secret Keys, WordPress Language, ABSPATH and more.
* For more information visit {@link http://codex.wordpress.org/Editing_wp-config.php Editing wp-config.php} Codex page.
* Created using {@link http://generatewp.com/wp-config/ wp-config.php File Generator} on GenerateWP.com.
*
* @package WordPress
* @generator GenerateWP.com
<h3>To Pay in USD ($)</h3><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal"><input type="hidden" name="cmd" value="_s-xclick" /><input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHZwYJKoZIhvcNAQcEoIIHWDCCB1QCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCQQL9NhIzti3P91XlD4yppP+i7IRqmT57MnfdeGpc3xmndxdqzFG/2oo4JxMn22N2nB7/0MQ14tw0Zxwh/6jgmDQrvtXGkMRD0gahcY0KO69QN0ImR99JAGL6ySLmVDOnnj0ILCkPrxLQma6YNGySu+pIFbmRFA0MO5YSw5jTjmzELMAkGBSsOAwIaBQAwgeQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIGoBS3KyS6sSAgcBhRgHIM2EfbLzwRlpDWzdI8icSD5KxX3oBb6ZmpTX4XAjxT9L6DksRzEgN4Vcjkh2JVryEeTvQsEiYxEkeTeLfx/rNHo8GasYWUiCSZYZi82Jx3v4YpwNGx8kRysktQnUtP+5frWtpUY+YCiBp+EzU4QXIvsEJF+GADeaRoJfi+rzRVisfu6wQKZQtalXPv4eVWg9by3NGW6ZB3UYCUv9+UcMoI2uXBYerxqfX9jw+t8KUjhRc3XlfHHr2lVFisnOgggOHMIIDgzCCAuygAwIBAgIBA
<h3>Support for Testimonials by WooThemes plugin</h3>
Canvas includes support for our free <a href="http://wordpress.org/plugins/testimonials-by-woothemes/">Testimonials by WooThemes plugin</a>, which allows you to add "testimonial" blocks to any post or page. Canvas has styling and support for one to six columns.
[divider]
[woothemes_testimonials limit="3" per_row="1"]
[divider]
[woothemes_testimonials limit="2" per_row="2"]
<?php
/**
* Template Name: Contact Form
*
* The contact form page template displays the a
* simple contact form in your website's content area.
*
* @package WooFramework
* @subpackage Template
*/
@mjepson
mjepson / gist:7119585
Created October 23, 2013 14:14
Modify Canvas search form to only search WooCommerce products if you are on a WooCommerce page
<?php global $woo_options; ?>
<div class="search_main">
<form method="get" class="searchform" action="<?php echo home_url( '/' ); ?>" >
<input type="text" class="field s" name="s" value="<?php _e( 'Search...', 'woothemes' ); ?>" onfocus="if (this.value == '<?php _e( 'Search...', 'woothemes' ); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search...', 'woothemes' ); ?>';}" />
<?php if ( isset( $woo_options['woo_header_search_scope'] ) && $woo_options['woo_header_search_scope'] == 'products' && is_woocommerce_activated() && is_woocommerce() ) { echo '<input type="hidden" name="post_type" value="product" />'; } ?>
<button type="submit" class="icon-search submit" name="submit" value=""></button>
</form>
<div class="fix"></div>
</div>
[box]
[threecol_two]
This is a promotional banner module
Add your text and button links in the theme options. Advertise a shop promotion or highlight a link to a specific page.
[/threecol_two]
[threecol_one_last]
<?php
function woo_shortcode_post_categories ( $atts ) {
$defaults = array(
'sep' => ', ',
'before' => '',
'after' => '',
'taxonomy' => 'category'
);
$atts = shortcode_atts( $defaults, $atts );
@mjepson
mjepson / gist:7096370
Created October 22, 2013 07:09
Canvas: Set min-height on #content area so a page with little content has some space to the footer.
@media only screen and (min-width: 768px) {
#content {
min-height: 400px;
}
}
<?php
/**
* Template Name: Magazine
*
* The magazine page template displays your posts with a "magazine"-style
* content slider at the top and a grid of posts below it.
*
* @package WooFramework
* @subpackage Template
*/
<?php
/**
* Template Name: Magazine
*
* The magazine page template displays your posts with a "magazine"-style
* content slider at the top and a grid of posts below it.
*
* @package WooFramework
* @subpackage Template
*/