This file contains hidden or 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 | |
| /** | |
| * Hide specific prohects | |
| * @author Archie M | |
| * | |
| */ | |
| function piglet_remove_posts_from_home_page( $query ) { | |
| if( $query->is_main_query() && $query->is_home() ) { | |
| $query->set( 'post__not_in', array( 1027335, 1027302, 1027259 ) ); |
This file contains hidden or 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 | |
| /** | |
| * Set all WooCommerce product prices as "POA" | |
| * @author Archie M | |
| * | |
| */ | |
| function poa_product_price_display( $price ) { | |
| $price = 'POA'; | |
| return $price; | |
| } |
This file contains hidden or 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 | |
| function start_modify_html() { | |
| ob_start(); | |
| } | |
| function end_modify_html() { | |
| $html = ob_get_clean(); | |
| $html = str_replace( 'Next Project', 'Next Offer', $html ); | |
| $html = str_replace( 'Previous Project', 'Previous Offer', $html ); | |
| echo $html; |
This file contains hidden or 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 | |
| ///////////////////// TESTING VARS | |
| //$endpoint = 'https://dev.admin.englishwoodlandstimber.co.uk/api/sale/stock-list'; | |
| //$secred = '46a4632d3d68173d2bea3dc684f82e70604704bf08817d6cb2fe959ca07768d8'; | |
| $ch = curl_init($endpoint); | |
| $headers = []; | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
This file contains hidden or 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
| $ sudo /opt/sfproc/updateschecker2.app/Contents/Resources/uninstall.sh |
This file contains hidden or 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 | |
| // Redirect WooCommerce Shop URL | |
| function shop_url_redirect() { | |
| if( is_shop() ){ | |
| wp_redirect( home_url( '/custom-page/' ) ); // Assign custom internal page here | |
| exit(); | |
| } | |
| } | |
| add_action( 'template_redirect', 'shop_url_redirect' |
This file contains hidden or 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
| <div class="photos"> | |
| <img src="image-1.png" alt="Image"> | |
| <img src="image-2.png" alt="Image"> | |
| <img src="image-3.png" alt="Image"> | |
| <img src="image-4.png" alt="Image"> |
This file contains hidden or 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
| #SSH | |
| $ sftp [email protected] | |
| # Once logged, to list files | |
| sftp> ls | |
| # To view "Present Working Directory" | |
| sftp> pwd |
This file contains hidden or 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 | |
| /** | |
| * Check/verify that the logged in user has submitted a specific Gravity Form | |
| * https://aaronjerad.com/blog/check-if-user-submitted-gravity-form/ | |
| * | |
| */ | |
| add_action ('genesis_before_loop', 'submitted_form_check'); | |
| function submitted_form_check(){ | |
This file contains hidden or 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 | |
| /* after an order has been processed, use the 'woocommerce_thankyou' hook, to add our function, to send the data */ | |
| add_action('woocommerce_thankyou', 'wdm_send_order_to_ext'); | |
| function wdm_send_order_to_ext( $order_id ){ | |
| // get order object and order details | |
| $order = new WC_Order( $order_id ); | |
| $email = $order->billing_email; | |
| $phone = $order->billing_phone; | |
| $shipping_type = $order->get_shipping_method(); | |
| $shipping_cost = $order->get_total_shipping(); |