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 | |
function new_excerpt_more($more) { | |
global $post; | |
$current_post_type = get_post_type(); | |
if($current_post_type == 'case_study'): | |
return '<a href="'. get_permalink($post->ID) . '"><i class="fa fa-arrow-circle-o-right"></i> Read the case study</a>'; | |
endif; | |
if($current_post_type == 'post'): |
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 | |
function remove_item_from_menu() { | |
remove_menu_page( 'edit.php?post_type=elementor_library' ); // removes elementor addons , menu item added by plugins | |
remove_menu_page( 'edit-comments.php' ); // removes comment menu | |
remove_submenu_page('themes.php', 'theme-editor.php'); // remove submenu called theme edititor inside appearance | |
remove_submenu_page('themes.php', 'widgets.php'); // removes widgets submenu | |
} | |
add_action( 'admin_init', 'remove_item_from_menu' ); |
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 | |
/** | |
* | |
* | |
* | |
*/ | |
function set_end_order_date ( $is_purchasable, $product ){ | |
// Set time zone | |
//$timezone = date_default_timezone_set('Europe/London'); |
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 or try this in file masonryInitializer.js | |
* Source: https://github.com/desandro/imagesloaded/issues/303 | |
* | |
*/ | |
(function ($) { | |
"use strict"; |
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 | |
/** | |
* 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 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
/** | |
* Filters images for RSS feed--makes thumbs go through large; large images resize down to MailChimp friendly width. | |
* Add this to your functions.php file WITHOUT the opening php | |
* | |
* Author: Erik Teichmann, minor tweaks by Robin Cornett | |
* Author URI: http://www.eriktdesign.com/ | |
*/ | |
// Add filters for RSS | |
add_filter('the_excerpt_rss', 'et_change_thumbs', 20); // changes the excerpt for rss |
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 | |
/** | |
* Set all WooCommerce product prices as "POA" | |
* @author Archie M | |
* | |
*/ | |
function poa_product_price_display( $price ) { | |
$price = 'POA'; | |
return $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
<?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 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); |
NewerOlder