SQL order by fields
SELECT * FROM wp_posts WHERE ID IN (5,26,4) ORDER BY FIELD(ID,5,26,4)
Default function add_filter( 'get_search_form', 'genesis_search_form' ); function genesis_search_form() { $search_text = get_search_query() ? apply_filters( 'the_search_query', get_search_query() ) : apply_filters( 'genesis_search_text', __( 'Search this website', 'genesis' ) . '…' ); $button_text = apply_filters( 'genesis_search_button_text', esc_attr__( 'Search', 'genesis' ) ); $onfocus = "if ('" . esc_js( $search_text ) . "' === this.value) {this.value = '';}"; $onblur =…
function woocommerce_shop_ordering_add_option( $sort_args ){ $orderby_value = isset( $_GET['orderby'] ) ? woocommerce_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); if ( 'alphabetical' == $orderby_value ) { $sort_args['meta_key'] = 'property_priority'; $sort_args['orderby'] = 'meta_value'; $sort_args['order'] = 'DESC'; } return $sort_args; } add_filter( 'woocommerce_get_catalog_ordering_args', 'woocommerce_shop_ordering_add_option' ); function woocommerce_catalog_orderby_add_option( $sortby ) { $sortby['alphabetical'] = 'Sort by STC'; return…
How to get the parameter value or key value on the the window location (page URL)? If you have this URL “examplesite.com/?debug=1” and thinking how to get the value of debug parameter, the codes below is the answer. jQuery( document ).ready( function($){ // Example URL is examplesite.com/?debug=1 var getPostValue = function getPostValue(key) { var pageURL…
Put this code to your .htaccess file. <FilesMatch "\\.(js|css|html|htm|php|xml)$"> SetOutputFilter DEFLATE </FilesMatch> <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </IfModule> # Leverage browser caching <FilesMatch "\.(woff|ico|pdf|jpg|jpeg|png|gif|js)$"> Header set Cache-Control "max-age=864000, public, must-revalidate" </FilesMatch> or <IfModule mod_expires.c> ExpiresActive On…
Facebook Facebook Like Box Widget http://wordpress.org/plugins/facebook-like-box-widget/ Testimonials WP Customer Reviews https://wordpress.org/plugins/wp-customer-reviews/ Popup Cookie Cookie Control – http://wordpress.org/plugins/cookie-control/
ERROR: Warning: reset() expects parameter 1 to be array, boolean given in /wp-content/plugins/buddypress/bp-core/bp-core-template.php on line 3113 Copy this code to your functions.php in-case you did not find where there error from. error_reporting(0);