A website created for the 30th Anniversary Fete for a local Primary School.
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 | |
$args = array( | |
'post_type' => 'product', | |
'stock' => 1, | |
'posts_per_page' => 4, //how many products to show | |
'tax_query' => array( //query the product catagories | |
array( | |
'taxonomy' => 'product_cat', | |
'field' => 'slug', |
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 | |
$args = array( | |
'post_type' => 'product', | |
'stock' => 1, | |
'posts_per_page' => 4, | |
'meta_key' => 'total_sales', | |
'orderby' => 'meta_value_num', | |
'tax_query' => array( //do not return results from this category | |
array( | |
'taxonomy' => 'product_cat', |
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
// remove Google Maps JS/CSS from the homepage | |
add_action( 'wp_print_scripts', 'maps_deregister_javascript', 100 ); | |
function maps_deregister_javascript() { | |
if ( is_front_page() ) { | |
wp_deregister_script( 'wpgmp-google-api' ); | |
wp_deregister_script( 'wpgmp-frontend' ); | |
wp_deregister_script( 'wpgmp-google-map-main' ); |
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
Add this code block to php file: | |
// Add Backorder text to woocommerce images that are backordered products | |
function ff_add_backorder_badge() { | |
global $product; | |
if($product->stock !== '' && $product->stock <= 0) { | |
echo '<span class="out-of-stock">Backorder</span>'; | |
} | |
} |
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
Add html to "Before Header Content" in GP Hooks | |
<div class="new-site-logo"> | |
<a href="https://hbdsalon.com.au/" title="HBD Salon" rel="home"> | |
<img class="header-image" alt="HBD Salon" src="https://hbdsalon.com.au/wp-content/uploads/2018/02/HBD_Salon_Logo-e1518063893509.jpg" title="HBD Salon" srcset="https://hbdsalon.com.au/wp-content/uploads/2018/02/HBD_Salon_Logo-e1518063893509.jpg 1x, https://hbdsalon.com.au/wp-content/uploads/2018/02/HBD_Salon_Logo_1408.png 2x" width="3508" height="1069"> | |
</a> | |
</div><!--site-logo--> | |
<div class="header-contact"> | |
<p class="header-phone">93909387</p> | |
<a href="#">Book Appointment</a> |
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
Add this codeblock to your functions.php file: | |
add_filter('widget_text','execute_php',100); | |
function execute_php($html){ | |
if(strpos($html,"<"."?php")!==false){ | |
ob_start(); | |
eval("?".">".$html); | |
$html=ob_get_contents(); | |
ob_end_clean(); | |
} |
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
Go to Control Panel | |
Go to PHPMyadmin | |
Select appropriate Database | |
Click on SQL in top bar | |
Enter in below code (change username, password, name and email) |
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
credit: https://businessbloomer.com/woocommerce-move-product-tabs-short-description/ | |
/** | |
* @snippet Move product tabs beside the product image - WooCommerce | |
* @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 | |
* @sourcecode https://businessbloomer.com/?p=393 | |
* @author Rodolfo Melogli | |
* @testedwith WooCommerce 3.5.2 | |
* @donate $9 https://businessbloomer.com/bloomer-armada/ | |
*/ |
OlderNewer