Blog Archives

Modify WordPress Main Query – The Right Way

/** * Modify WordPress Main Query – The Right Way * * @refer  https://millionclues.com/wordpress-tips/modify-wordpress-main-query/ */ function modify_wp_main_query_done_right( $query ) {   if ( $query->is_main_query() ) {     $query->query_vars[‘meta_key’] = ‘statusverified_13141’;     $query->query_vars[‘meta_value’] = 1;   } } add_action( ‘pre_get_posts’, ‘modify_wp_main_query_done_right’ ); Refer WP Query to

Posted in WordPress Tagged with: , ,

7 Reasons Why You Should Choose a WordPress Website for Your Business

One of the top Content Management System (CMS), WordPress has grown to become one of the basic elements powering most websites in the world. High interactivity combined with easy to use interface has made it the first choice for many

Posted in Guest Posts Tagged with: , ,

Launch Bootstrap 4 Modal From WordPress Menu

Add .launch-contact-modal class to your WordPress menu item. This can be done from the admin interface Appearance > Menu. Change #contactModal in the following jQuery to the ID of your Bootstrap 4 modal. jQuery(document).ready(function($){   // Adding Bootstrap Modal to WordPress

Posted in WordPress Tagged with: , ,

Add Bootstrap4 Form Styling To WooCommerce Checkout Fields

Add the following code to functions.php or to a custom plugin to style WooCommerce checkout form fields with sweet Bootstrap 4 styling. /** * Add Bootstrap form styling to WooCommerce fields * * @since  1.0 * @refer  http://bit.ly/2zWFMiq */ function iap_wc_bootstrap_form_field_args ($args,

Posted in WordPress Tagged with: , , ,

Get Raw Unfiltered Post Title In WordPress

To retrieve the post title of a post as saved in the wp_posts table in the WordPress database use this <?php echo get_post_field( ‘post_title’, $post_id, ‘raw’ ); ?> If you use get_the_title() function, WordPress applies the ‘the_title‘ filter before returning

Posted in WordPress Tagged with: ,