This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This code should be added to functions.php of your theme | |
**/ | |
//This changes the "From:" price on the products page to a Rent-Buy value instead. | |
// ***** It ALSO checks to see if the product is on sale, and displays the sale price instead of the top variable price | |
add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2); | |
function custom_variation_price( $price, $product ) { | |
$price = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $_category->getName().'|'.$_category->getId(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cms_index_index> | |
<reference name="content"> | |
<block type="cms/block" name="static_block_name" before="-"> | |
<action method="setBlockId"><block_id>static_block_name</block_id></action> | |
</block> | |
</reference> | |
</cms_index_index> | |
notes: | |
<cms_index_index> tells it to only show up on the front page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** custom settings **/ | |
define('WP_SITEURL', 'http://your-site-url/'); | |
define('WP_HOME', 'http://your-site-url/'); | |
define('WP_MEMORY_LIMIT', '64M'); /* Raise memory limit for WooCommerce or other */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Notice that the values of each input are what you want it to say when it's not focused, | |
instead of setting these with JavaScript | |
(I think it's better this way - keeps the content inside the HTML file). | |
--> | |
<form id="contact-form" class="contact" action="javascript:alert('success!');"> | |
<fieldset> | |
<ul> | |
<li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// your header.php file might look something like this (doesn't even have to be betwen <?php ?> statements! | |
<header> | |
<nav> | |
<ul> | |
<li>Home</li> | |
<li>About</li> | |
<li>Blog</li> | |
<li>Store</li> | |
<li>Contact</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo $this->getChildHtml('block_name_tag'); ?> | |
<?php | |
# NOTES: | |
# replace block_name_tag with the name of the block | |
# Layout blocks are found under the layout folder. All XML files. | |
# An example of a block element is: | |
# <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml"></block> | |
# note that there are differnt types of blocks. | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* detect user agent and load mobile site for mobile devcies only */ | |
# is our user on a mobile device? | |
$useragent=$_SERVER['HTTP_USER_AGENT']; | |
if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In Magento Admin > System > Configuration/Design | |
Add this exception | |
iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini |
OlderNewer