Skip to content

Instantly share code, notes, and snippets.

@agusmu
agusmu / functions.php
Created January 30, 2015 08:34
PrimaShop - Customize Call To Action Text on specific page
add_filter( 'prima_get_setting_calltoaction_text', 'prima_custom_calltoaction_text' );
function prima_custom_calltoaction_text( $text ) {
/* call to action text on homepage */
if ( is_home() || is_front_page() )
$text = 'Get free shipping now!';
/* call to action text on shop page */
if ( is_shop() )
$text = 'Get 10% discount when you purchase $100 or more!';
@agusmu
agusmu / style.css
Created February 16, 2015 09:15
PrimaShop (1.6+) - Show Mobile Menu on Desktop Screen
/* show mobile menu button */
.mobile-icon-nav {
display: block !important;
}
/* show mobile cart button */
.mobile-icon-cart {
display: block !important;
}
/* centering header logo / title */
#header-title,
@agusmu
agusmu / style.css
Created March 4, 2015 00:54
Eventica WordPress Theme - Colors
// events slider - detail background
.home-slider-events .slide-event-detail {
background: rgba(28, 171, 197, 0.85);
}
// event list - date box (top left)
.tribe-events-list .tribe-events-event-date {
background: rgba(62, 201, 206, 0.64);
}
@agusmu
agusmu / category.php
Created March 22, 2015 18:28
Genesis Framework
<?php
/* Remove Default Genesis Loop Output */
remove_action( 'genesis_entry_header', 'genesis_do_post_format_image', 4 );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
if ( $post->post_parent )
{
wp_redirect( get_permalink( $post->post_parent ), 301 );
}
else
{
wp_redirect( site_url(), 301 ) );
}
die();
<?php
add_filter("the_content", "the_content_filter");
function the_content_filter($content) {
// array of custom shortcodes requiring the fix
$block = join("|",array("col","shortcode2","shortcode3"));
// opening tag
@agusmu
agusmu / style.css
Created May 31, 2013 17:05
PrimaShop - Add custom background color for featured header in the homepage only
/* Add custom background color for featured header in the homepage only */
body.home #header-featured {
background: #F00;
}
@agusmu
agusmu / style.css
Created June 1, 2013 10:02
PrimaShop - Different header logo for different devices in responsive design
/* Change the width of header title and menu. */
/* #header-title (25%) + #header-menu (75%) = 100% */
#header-title {
width: 25%;
}
#header-menu {
width: 75%;
}
/* Default logo image (left aligned). */
@agusmu
agusmu / style.css
Created June 8, 2013 13:54
PrimaShop - Change header logo and header menu width
#header-title {
width: 35%;
}
#header-menu {
width: 65%;
}
@agusmu
agusmu / style.css
Created June 9, 2013 16:03
PrimaShop - Centering product elements on Shop page
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
text-align:center;
}
.woocommerce .products .star-rating, .woocommerce-page .products .star-rating {
float:none;
display:block;
margin-left:auto;
margin-right:auto;
}