Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
<?php | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
ul { | |
list-style:none; | |
padding: 0 0 0 2em; /* padding includes space for character and its margin */ | |
/* IE7 and lower use default */ | |
*list-style: disc; | |
*padding: 0 0 0 1em; | |
} | |
ul li:before { | |
content: '\25BA'; |
<?php | |
/* | |
* Display posts only from today and in the future: | |
* http://old.support.advancedcustomfields.com/discussion/6000/how-to-sort-posts-by-acf-date-and-display-only-future-posts | |
* by Pasnon | |
*/ | |
$date_args = array( | |
'post_type' => 'events', |
// AJAX function for listing directory entries alphabetically | |
add_action('wp_ajax_directory_alpha', 'mytheme_ajax_directory_alpha'); | |
add_action('wp_ajax_nopriv_directory_alpha', 'mytheme_ajax_directory_alpha'); | |
function mytheme_ajax_directory_alpha() { | |
function alpha_post_where( $where ) { | |
$new_where = $where . " AND lower(substring(post_title, 1, 1)) = lower('" . $_REQUEST['s'] . "')"; | |
return $new_where; | |
} |
Install Package Control for easy package management.
Ctrl+`
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
<?php | |
$today = date('Ymd', strtotime('-1 day')); | |
// WP_Query arguments | |
$args = array ( | |
'post_type' => 'construction_bids', | |
'posts_per_page' => -1, | |
'meta_query' => array( | |
array( | |
'key' => 'bid_deadline', | |
'value' => $today, |
SET @FROMDOMAIN = 'myolddomain.com'; | |
SET @TODOMAIN = 'mynewdomain.com'; | |
SET @FROMSCHEME = 'http'; | |
SET @TOSCHEME = 'http'; | |
#-------------- STANDARD TABLES -------------# | |
UPDATE wp_options |