Output WordPress Custom Query Posts Loop in Bootstrap Modals
Here is some code to output a custom loop via Shortcode that will display a posts full content in a Bootstrap Modal without linking back to the single post page. This is done on a WordPress theme that has the Bootstrap framework already loaded. A new loop is created only showing the post title and…
Read MoreCreate a WooCommerce Featured Products Loop of Featured Images
Here is a guide on how to create a WooCommerce featured products loop of featured images. The featured product option is chosen from the star column in the WordPress dashboard backend of the WooCommerce products, ‘featured‘ it is a term that belongs to the taxonomy named ‘product_visibility‘. View the code on Gist. So…
Read MoreConditional Check if Custom Post Type Posts Are Published
You can check on the existence of published Custom Post Types by using a new WP_Query loop with an if/else statement, as the CPT is already registered it is difficult to use a conditional check without checking the loop of posts. add_filter(‘wp_nav_menu_primary-menu_items’, ‘wpb_add_menu_item’, 10, 2); // Add to primary menu based on CPT existence function…
Read MoreFiltering Posts with Custom Fields Using meta_query
You can further refine a list of posts by filtering any custom fields that the post has for a certain set of conditions, this is possible with WP_Meta_Query, which allows you to target custom fields as known as post meta. There are a couple of ways to use the WP_Meta Query class, the meta_query array is…
Read MoreCreate a Loop of Featured Images in a Slider from Posts in Genesis
You can create a slider of Featured Images from the posts in Genesis by creating a custom loop and using Slick Slider. Setting Up Slick Slider First download and set up the Slick files needed, you’ll need to file these in your theme’s js and css directories: slick.min.js ~> js slick-theme.css ~>css ajax-loader.gif ~>css fonts/ ~>css…
Read More