Install Package Control for easy package management.
- Open the console with
Ctrl+` - Paste in the following:
| <?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, |
| /** | |
| * 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' ) ); |
Install Package Control for easy package management.
Ctrl+`
| // 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; | |
| } |
| <?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', |
| 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 | |
| /** | |
| * [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; | |
| } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| .hexagon { | |
| width: 100px; | |
| height: 55px; | |
| position: relative; | |
| } | |
| .hexagon, .hexagon:before, .hexagon:after { | |
| background: red; | |
| -moz-box-shadow: 0 0 10px rgba(0,0,0,0.8); | |
| -webkit-box-shadow: 0 0 10px rgba(0,0,0,0.8); | |
| box-shadow: 0 0 10px rgba(0,0,0,0.8); |