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’ ); // Change dashboard Posts to News function cp_change_post_object() { $get_post_type = get_post_type_object(‘post’); $labels =…
Read MoreCreate 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( ‘my_permalink’, ‘my_permalink’ ); // The Permalink Shortcode function my_permalink() { ob_start(); the_permalink(); return ob_get_clean(); }…
Read MoreAnchor Link Offset to Other Pages with Fixed Header Size
Here is a snippet of code that will link to an anchor link on another page with a fixed offset which allows for a fixed header size, so the link appears further down below the header of further down the page. The code snippet is documented. View the code on Gist. If you know the…
Read MoreAdd 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 */ function bb_search_shortcode() { ob_start(); FLTheme::nav_search(); return ob_get_clean(); } Create the Header in Beaver Themer Create…
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 MoreMinimum System Requirements for macOS Mojave 10.14 – Is yours good enough?
Find out if your Apple computer meets the minimum system requirements of the new macOS Mojave 10.4. Apple have released a developer beta of their upcoming operating system named macOS Mojave, which will be macOS 10.14. The name MoJave continues on with their California landmarks with the name after a scenic CA region, it should…
Read MoreShow 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 to retrieve all the post meta or a specific key. To output the data to…
Read MoreDon’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 HTML markup will have valid CSS applied to it and affect the spacing on the…
Read MoreAdd phpMyAdmin to ServerPilot
By default when you set up a ServerPilot instance no GUI app is installed for MySQL interaction, ServerPilot recommend using Adminer which has a similar interface to phpMyAdmin and sits as a standalone single php file which you can use for individual database users. This guide however goes through using phpMyAdmin instead and using it…
Read MoreAdd 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 your child theme and include it. Best to create a classes subfolder in your child…
Read More