Add Taxonomy Terms as CSS Classes to a Post

add-tax-terms-css-posts

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 More

Add and Show Images in Taxonomy Templates and in Single and Archive Posts

show-category-image-on-posts

You can add an 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   Create…

Read More

Displaying Featured Products in WooCommerce

woocommerce-featured-products

WooCommerce has products called Featured Products which are products what become featured when they are starred in the WP Admin dashboard. Here is how you can display them.   Featured Products Shortcode Display WooCommerce Featured Products via shortcode like so: Other parameters you can use in the shortcode are ‘orderby‘ and ‘order‘. Featured Products Custom…

Read More

Create a Loop of Featured Images in a Slider from Posts in Genesis

slick-slider-featured-images-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

Custom Genesis Loop on Blog Archive Page

To customise the Genesis loop on the blog page only, the blog page can be conditionally selected,  the loop removed on that page only and a custom loop inserted. The blog page is selected with is_home, the genesis_do_loop is removed and a new loop wpb_change_home_loop is inserted. The core markup for the genesis_do_loop is found in the…

Read More