Add 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…
Change the WordPress Post Type name to Something Else

You can change the default Post type name in WordPress from Posts to something else like News using the get_post_type_object, normal behaviour of the Posts occur, just the label name in the WordPress dashboard has been changed. add_action( ‘init’, ‘cp_change_post_object’…
Create Shortcode for the Permalink in WordPress

You can create a shortcode for the permalink in WordPress to use in a string output or more likely as a value for a link attribute, this can be handy if you can’t use PHP in a certain interface. add_shortcode(…
Add Search Icon After Menu using Beaver Themer with the Beaver Theme

Here’s how you can add a search icon after a menu in a header done in the Beaver Theme using Beaver Themer. Create a Shortcode for the Beaver Builder Search function add_shortcode( ‘bb_search’,’bb_search_shortcode’ ); /* Add Search via shortcode */…
Add 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…
Show All Post Meta Keys and Values for a Post in WordPress

If you wanted to see all the post meta keys and values for a post,page or custom post type in WordPress you can either see them in the database in the wp_postmeta table or you could use the get_post_meta function…
Don’t Output Empty Rows and HTML Mark Up in Beaver Builder

When you are using ACF field connections or insertions in Beaver Builder with Beaver Themer if the field is not populated the HTML mark up is still rendered on the page, even though the field is blank some of its…
Add Link to the Count in WooCommerce Product Category Menu

The WooCommerce product category menu can be manipulated by making a copy of the walker class it is defined in and editing it. The WC_Product_Cat_List_walker class lives in wooc0mmerce/includes/walkers/class-product-cat-list-walker.php, you can make a copy of this and include it in…
Styling Beaver Builder Buttons Globally using a CSS Snippet

Styling buttons in Beaver Builder can be quite a lengthy and tedious task and if a change has to be done over many pages the task becomes more onerous. The Builder Module UI covers most aspects of the style but…
Add The Title Attribute To Featured Image in WordPress

The title attribute for the WordPress featured post has been removed for a while, but you can get it back with the wp_get_attachment_image_attributes filter which can add the HTML attribute markup back in, add to your functions.php file… add_filter( ‘wp_get_attachment_image_attributes’,…