Skip to content

Instantly share code, notes, and snippets.

@agusmu
agusmu / page_custom.php
Created June 21, 2013 01:22
PrimaShop - Creating Custom Page Template
<?php
/**
* Template Name: Custom
* Description: The template for displaying custom page with custom function.
*
* @category PrimaShop
* @package Templates
* @author PrimaThemes
* @link http://www.primathemes.com
*/
@agusmu
agusmu / functions.php
Created June 27, 2013 08:37
WooCommerce - Custom Sale Flash Text
add_filter('woocommerce_sale_flash', 'my_custom_sale_flash', 10, 3);
function my_custom_sale_flash($text, $post, $_product) {
return '<span class="onsale"> Promo! </span>';
}
@agusmu
agusmu / style.css
Last active December 19, 2015 13:19
PrimaShop - Change header logo and header menu height
/* minimum height of header */
#header {
min-height: 150px;
}
/* fixed height for logo */
.header-logo-active #header-title, .header-logo-active #header-title .site-title, .header-logo-active #header-title .site-title a {
height: 150px;
}
/* toplevel menu padding: 65+20+65=150 */
#header-menu .menu-primary a, #header-menu .menu-primary a:visited {
@agusmu
agusmu / style.css
Created July 9, 2013 22:22
PrimaShop - Centering Footer Widgets
#footer-widgets .widget {
text-align: center;
}
#footer-widgets .widget h3.widget-title {
text-align: center;
}
#footer-widgets .woocommerce .star-rating {
text-align: center;
margin: auto;
}
@agusmu
agusmu / style.css
Last active December 19, 2015 13:28
PrimaShop - rounded corner buttons
/* default button */
button, input[type="button"], input[type="reset"], input[type="submit"] {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/* top navigation "my cart" button */
#topnav ul.topnav-menu li a.topnav-cart-count {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
@agusmu
agusmu / style.css
Created July 10, 2013 00:46
WooCommerce - One Column Checkout
/* one column checkout page */
.woocommerce #customer_details.col2-set .col-1, .woocommerce-page #customer_details.col2-set .col-1,
.woocommerce #customer_details.col2-set .col-2, .woocommerce-page #customer_details.col2-set .col-2 {
clear: both;
float: none !important;
width: 100% !important;
margin-right:0 !important;
text-align: left;
padding-bottom: 20px;
}
@agusmu
agusmu / style.css
Created July 13, 2013 06:34
PrimaShop - Centering Header Content (Logo&Menu)
/* centering header content (logo and menu) */
#header-title,
#header-title .site-title,
#header-title .site-title a {
float:none !important;
width:auto !important;
text-align: center;
background-position: center center !important;
}
#header-menu,
@agusmu
agusmu / style.css
Created July 13, 2013 07:12
PrimaShop - underline top navigation and header menu on mouseover
/* show underline for top navigation menu on hover state */
#topnav ul.topnav-menu a:hover {
text-decoration: underline;
}
/* show underline for header menu on hover state */
#header-menu .menu-primary a:hover {
text-decoration: underline;
}
@agusmu
agusmu / functions.php
Last active December 19, 2015 17:38 — forked from jameskoster/functions.php
Woocommerce - Change Denmark currency from kr to DKK
add_filter('woocommerce_currency_symbol', 'change_denmark_existing_currency_symbol', 10, 2);
function change_denmark_existing_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'DKK' : $currency_symbol = 'DKK'; break;
}
return $currency_symbol;
}
@agusmu
agusmu / price.php
Created July 17, 2013 12:52
WooCommerce - Fix Google Rich Snippets For On Sale Product
<?php
/**
* Single Product Price, including microdata for SEO
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly