Add a banner based on Custom Taxonomy Term in a Beaver Themer Posts Module loop
How you can add a banner to a post in a loop in a Beaver Builder posts module using a custom layout based on a custom taxonomy term. First up is to create you Custom Taxonomy either with a plugin or add code yourself. Once the taxonomy is ready, assign certain posts to it. Next…
Read MoreOutput a Custom Taxonomy Archive by using Loop in WordPress
You can’t use a WordPress archive taxonomy page for a custom taxonomy as the custom terms are the archive – but you may want a sort of global taxonomy page that contains all the custom terms. Here is a custom taxonomy loop code snippet, which allows you to output a set of custom taxonomy terms…
Read MoreOuput Custom Taxonomy Terms in a Post
If you have created a custom taxonomy and linked it to a custom post type and want to output any terms used for that post in the single post view you can use the_terms the_terms <?php the_terms( int $post_id, string $taxonomy, string $before = ”, string $sep = ‘, ‘, string $after = ” );…
Read MoreFilter CPT Archive by Custom Taxonomy with Isotope
The Isotope JS library allows for some instant filtering of posts from a taxonomy without page reloading. Below is a template file which uses a CPT Archive page and a Custom Taxonomy called ‘my_category‘. Since it’s a CPT Archive page it uses WordPress native loop, there is some specific CSS class markup for the posts…
Read MoreFilter Custom Post Types by Taxonomy in WP Admin Dashboard
Filter CPTs by a linked custom Taxonomy in the WP Admin Dashboard is possible with restrict_manage_posts. In the screenshot there is a CPT list of posts, with a dropdown menu of a linked custom taxonomy terms which are filterable via the filter button next to it. The code goes in functions.php View the code on…
Read MoreShow related posts in Beaver Builder from one CPT to another with ACF Relationships
Showing related posts in Beaver Builder from one Custom Post Type to another is possible with an ACF Relationship field and Beaver Themers Post Module and relationship field connector from version 1.1.1. You can also use the Post Slider and Post Carousel Modules. This tutorial uses 2 CPTs, ‘Lights’ and ‘Projects’, the intent is to…
Read MoreShow related posts from one CPT to another with ACF Relationships
Showing related posts from one Custom Post Type to another is possible with an ACF Relationship field. This tutorial uses 2 CPTs, ‘Lights’ and ‘Projects’, the intent is to show the ‘Lights’ used in each ‘Project’ so the reader can click the link back to see the light from a project CPT. (This is also…
Read MoreAdd Taxonomy Terms as CSS Classes to a Post
You can use the body_class filter in WordPress to add the Taxonomy Terms of a Custom Taxonomy as CSS classes to a post. The CSS class appears in the body element and is only used if the post has been assigned to the taxonomy. The code goes in your functions.php file. add_filter( ‘body_class’, ‘themeprefix_add_taxonomy_class’…
Read MoreAdd and Show Featured Images in Taxonomy Templates and in Single and Archive Posts
You can add a featured image to a Category Taxonomy in WordPress by using ACF and selecting the categories taxonomy, so now a new image field appears in the category back end page, the same process can be applied to other taxonomy templates such as custom taxonomies. Create a ACF Image Field for Taxonomy …
Read MoreChange the Genesis Meta Output, Post-Info, Post-Meta and Post-Terms
This tutorial takes you through changing the Genesis Meta Output, the Post-Info, Post-Meta and Post-Terms, post-info is typically at the top of a single post above or below the heading with dates, author and comments info, post-meta is at the foot of the post and includes category and tag info and post-terms applies to custom taxonomy…
Read More