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 define('EMPTY_TRASH_DAYS', 30); ?> |
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 add_action('wp_head', 'add_google_analytics'); | |
function add_google_analytics() { | |
// Insert your GA code here | |
} |
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 capital_P_dangit( $text ); ?> |
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 do_action( 'woocommerce_check_cart_items' ); ?> |
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 | |
// return true if we are in the cart page | |
is_cart(); | |
// return true if we are in the checkout page | |
is_checkout(); |
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 | |
// Wc add notice can be used to create error, notice or success messages in WooCommerce. In this case we see error notice. | |
wc_add_notice( $message, $notice_type = 'error' ); |
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
/** | |
* Enqueue css | |
**/ | |
function load_custom_wp_admin_style() { | |
wp_register_style( 'style.css', plugins_url('/css/style.css', __FILE__), false, '1.0.0' ); | |
wp_enqueue_style( 'style.css' ); | |
} | |
add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' ); |
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 | |
$posts = get_posts(array( | |
'posts_per_page' => 3, | |
'post_type' => 'news' | |
)); | |
if( $posts ): ?> | |
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 | |
$terms = get_the_terms( $post->ID, 'area'); | |
$postid = get_the_ID(); | |
foreach ($terms as $term) { | |
$posts = get_posts(array( | |
'posts_per_page'=> -1, |
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 | |
// enqueue font awersome from local css folder | |
function enqueue_fontawersome_stylesheets(){ | |
wp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/css/font-awesome.css'); | |
} | |
add_action('wp_enqueue_scripts','enqueue_fontawersome_stylesheets'); |
OlderNewer