Launch Bootstrap 4 Modal From WordPress Menu

Launch Bootstrap 4 Modal From WordPress Menu

By OutsourcedContent — on November 30, 2017 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 Menu   $(‘.launch-contact-modal’).find(‘a’).attr(‘data-toggle’, ‘modal’);   $(‘.launch-contact-modal’).find(‘a’).attr(‘data-target’, ‘#contactModal’); });

Get A List Of All Custom Page Templates in WordPress

Get A List Of All Custom Page Templates in WordPress

Pages are one of WordPress’s built-in Post Types. You’ll probably want most of your website Pages to look about the same. But sometimes, though, you may need a specific Page, or a group of Pages, to display or behave differently. This is easily accomplished with custom Page Templates. WordPress allows you to create custom page…

Modify WordPress Main Query – The Right Way

Modify WordPress Main Query – The Right Way

By OutsourcedContent — on December 9, 2017 /** * 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 discover other query_vars

Archive Page For Custom Taxonomy

Archive Page For Custom Taxonomy

By OutsourcedContent — on December 9, 2017 Here is the Query. Highlighted content will have to be changed for your case. <?php $my_query = new WP_Query( array( ‘post_type’ => ‘company’, ‘tax_query’ => array(   array(     ‘taxonomy’ => ‘service’,     ‘field’ => ‘slug’,     ‘terms’ => get_query_var( ‘service’ ),   ), ), ‘paged’   => get_query_var(‘paged’, 1), ) ); ?>…

Remove Version Query String From Static JS And CSS Files

Remove Version Query String From Static JS And CSS Files

A website owner should always be trying to improve the speed of their website as much as possible. When you analyze your page using any page speed analyzer such as Page Speed, YSlow or Pingdom, you are very likely to see suggestions to remove query strings from static resources, such as Stylesheets and JavaScript files….