Code snippet to change the default image of woocommerce placeholders. add_filter('woocommerce_placeholder_img_src', 'custom_woocommerce_placeholder_img_src'); function custom_woocommerce_placeholder_img_src( $src ) { $upload_dir = wp_upload_dir(); $uploads = untrailingslashit( $upload_dir['baseurl'] ); $path_to_image = '2020/09/preview_image.png'; $src = $uploads . '/'.$path_to_image ; return $src; } Add this code...
Free App, Record Covid-19 Screening Records
As of the 1st of June 2020, South Africa headed into level 3 of the Covid 19 lock down. One of the restrictions that was lifted was that of religious gatherings, subject to strict protocols. As mentioned on the gov.za...
WordPress Plugin Settings Form
WordPress plugins are great for adding additional features to a WordPress site. A good plugin really shines when it allows users to tailor the plugin based on their needs and requirements. Once you've created a plugin menu link and settings...
Create WordPress admin menu for plugin
If you create a WordPress plugin, you may need to be able to configure certain settings or options in the admin dashboard. By adding a WordPress admin menu for your plugin you can alter the behavior or output of your...
Gutenberg Examples
This is a paragraph block This is a paragraph block this is an image block This is a heading h2 This is a heading h3 This is a heading h4 This is a gallery block My list item oneMy list...
WordPress custom home page
In most cases, a commercial website needs to have a unique home page that represents the main objective of the business or service. With WordPress, the default home page is a list of blog posts, this isnt ideal when you...
Moving a WordPress local site to a live server
Transferring files from a local Xampp or Wamp environment to a live domain. After developing a Wordpress website and setting up your project with data, you need to transfer those files to a live server. Using Filezilla, you could upload...
Currenct symbols coverted to HEX and HTML values
Hex and HTML codes of currecy symbols Currency codes provided in HTML, CSS, Hex or Unicode where available. A useful list of currency symbols. This was used on a project where we need a user to select their currency symbol...
What is the difference between WordPress posts and Pages?
WordPress has 2 primary forms of content that can be published and made accessible to users, these are posts and pages. Understanding the difference between the 2 is crucial for any publisher. WordPress Pages WordPress pages are "almost" static content...
Get hierarchy of a post in WordPress
If you are displaying a post, how do you find and show the posts category or categories like this ?Parent Category > Child Category > The current post Unfortunately the Wordpress database is not structured to store Posts with their...