Blog Archives

Add Custom Post Type To Tag And Category Archive Pages

Here is how to modify the query for default taxonomy archive pages (tag archive page or category archive page) to display custom post types. /** * Add custom post types to the default tag query * * This will make

Posted in WordPress Tagged with: , ,

Tips to Choose the Perfect WordPress Theme for Your Website

Are you new to website designing? If you are a beginner, you must be confused what template to choose and on what theme the website has to be built. There are so many options on WordPress which makes it a

Posted in Guest Posts, WordPress Tagged with: ,

Add Left And Right Swipe On Mobile For Bootstrap 4 Carousel

We are talking about carousel included in Bootstrap 4, you can see how to add one here. Add this to your JS file or load it on the footer // Thanks to Maaaaark – https://github.com/maaaaark/bcSwipe/blob/master/jquery.bcSwipe.min.js !function(t){t.fn.bcSwipe=function(e){var n={threshold:50};return e&&t.extend(n,e),this.each(function(){function e(t){1==t.touches.length&&(u=t.touches[0].pageX,c=!0,this.addEventListener(“touchmove”,o,!1))}function o(e){if(c){var

Posted in WordPress Tagged with: , , ,

Sort WordPress Posts With Multiple Criteria

This was a case on a project where a custom listing post type had post meta that specified if it was as platinum sponsor, or a gold sponsor or a verified profile. The job was to list the platinum sponsors

Posted in WordPress Tagged with: , , ,

Archive Page For Custom Taxonomy

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’ ),   ), ),

Posted in WordPress Tagged with: , , ,