SQL order by fields
SELECT * FROM wp_posts WHERE ID IN (5,26,4) ORDER BY FIELD(ID,5,26,4)
Try to read this first WordPress manual update. Step 1: Replace WordPress files Get the latest WordPress zip (or tar.gz) file. Unpack the zip file that you downloaded. Deactivate plugins. Delete the old wp-includes and wp-admin directories on your web host (through your FTP or shell access). Using FTP or your shell access, upload the…
Using the <video> tag, you can display the first image of a video but its not clickable and you can’t play the video. <video src="www.sample.com" width="300" height="150" type="video/mp4"></video> Example : Screenshot image Original videoVideo
How to remove primary side include the ‘ ‘ tags. <aside class="sidebar sidebar-primary widget-area responsive-element" role="complementary" itemscope="itemscope" itemtype="http://schema.org/WPSideBar"> <section id="text-36" class="widget widget_text">YOUT WIDGET</section> </aside> Copy this code and paste into your functions.php remove_action( 'genesis_after_content', 'genesis_get_sidebar' );
How to replace Woocommerce placeholder image URL? Just copy the codes below. add_filter( 'woocommerce_placeholder_img_src', function( $classes ){ if( !is_product() ) return; // this code is intended to single product only. Remove this for general changes. return get_bloginfo( 'url' ) . '/wp-content/uploads/2016/03/placeholder.jpg'; } );
Theme my login (TML) or WordPress login form does not show the login error. This error display after you have login the wrong username or password. The reason why it is not showing is the current login form action URL and your current page has different URL. Theme my login (TML) is using /login/ page…
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…