How to override template parts
If you need to override the default template parts, please use the child theme. You can create a child theme by following this instruction.
For example, if you need to override the listing block titles, please follow these steps:
- Navigate to the HivePress plugin directory, and find the template parts you want to override. You can find the listing block titles in the
hivepress/templates/listing/view/block/listing-title.php
path; - Create a directory with hivepress name in the child theme directory. Then in hivepress directory, you have to create the following path
listing/view/block
; - Copy the template part (
listing-title.php
file) to the child theme directoryblock
; - Replace the previous content with the one you need, as shown in the screencast below.
Important notes:
The template part in the child theme must have the same name as the one that you want to override. Also, you don't need to change these parts of the content in the template:
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
Now, the copy template has higher priority than the template part located in the plugin directory, and you can easily customize it in the way you like.