SQL order by fields
SELECT * FROM wp_posts WHERE ID IN (5,26,4) ORDER BY FIELD(ID,5,26,4)
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'; } );
Wrap the genesis footer widgets and footer section by footer wrap. Example: <div class="footer-widgets"></div> <footer class="site-footer" role="contentinfo" itemscope="itemscope" itemtype="http://schema.org/WPFooter"></div> Using the codes below, this will be the output look like. <div class="footer-wrap"> <div class="footer-widgets"></div> <footer class="site-footer" role="contentinfo" itemscope="itemscope" itemtype="http://schema.org/WPFooter"></div> </div> add_action( 'genesis_before_footer', 'footer_wrap_start', 1 ); add_action( 'genesis_after_footer', 'footer_wrap_end' ); function footer_wrap_start(){ echo '<div id="footer-wrap">'; }…
How to display Youtube video’s featured image ( thumbnail image )? We have numbered of ways to display the Youtube video’s featured image or thumbnail image. We want to display image instead of Youtube videos most specially in the categories right? In this examples, https://www.anthonypagaycarbon.com/category/entertainment/ we will see I’m using image instead of the video…
This domain has been suspended due to non-completion of an ICANN-mandated contact verification. As part of the ongoing effort to improve contact quality, the Internet Corporation for Assigned Names and Numbers (ICANN) requires validation for each registrant contact registering a generic TLD. This is required since January 1, 2014 for all gTLDs. Ok, the text…
Navigation menu on-click prevent default if menu item has children and fires only on second click // OPTION 1 // JQUERY $( '.menu-item-has-children a' ).click( function(e){ $( this ).parent().toggleClass( 'active-li' ); if( $( this ).next( '.sub-menu' ).css( 'display' ) == 'block' ){ e.preventDefault(); } }); // CSS ul.menu .sub-menu { display: none; } ul.menu .active-li…
Dequeue or remove Gravity Forms style or css in your WordPress site. Common styles of Gravity Forms is `formreset.css`, `datepicker.css`, `formsmain.css`, `readyclass.css`, and `browsers.css`. Gravity Forms has action called `gform_enqueue_scripts`, you can visit the link for more information. <link rel='stylesheet' id='gforms_reset_css-css' href='http://example.com/wp-content/plugins/gravityforms/css/formreset.css?ver=1.7.11' type='text/css' media='all' /> <link rel='stylesheet' id='gforms_datepicker_css-css' href='http://example.com/wp-content/plugins/gravityforms/css/datepicker.css?ver=1.7.11' type='text/css' media='all' /> <link rel='stylesheet' id='gforms_formsmain_css-css'…