• Why Directorist
    • All Features
    • Solutions
    • Customer Showcase
    • Testimonials
  • Extensions
  • Themes
  • App
  • Resources
    • Documentations
    • Support Center
    • Contact Us
    • Roadmap
    • Beta
    • About Us
    • Team
  • Pricing
  • Blog
Sing In

Directorist

Getting Started

  • Directorist Overview with Setup Wizard
  • Installation
  • Setting Up the Required Pages
  • Managing Categories
  • Managing Location
  • Terms and Conditions Setup
  • CSV Import/Export

Listings Management

  • Adding a listing from the frontend & backend
  • Guest listing submission
  • Listings Sidebar
  • Category Archive
  • Location Archive
  • General Listing Settings
  • Multiple Directories
  • All Listings Management

Monetization

  • Monetization Overview
  • General Configurations
  • Test your configuration
  • Managing Orders
  • Currency Settings
  • Gateway Settings

Search and Filter Settings

  • Search Listing Page Setup
  • Advanced Filter in Search Result Page
  • Advanced Search and Filter
  • Advanced Filter in Search Listings Form
  • Search Result Page Setup
  • Advanced Filter in All Listings Page
  • Advanced Filter Widget

Customization

  • Registration and Login Customization
  • Single Listing Page Customization
  • All Listings Page Customization
  • Badges Styling
  • Adding Widgets
  • Email Template Customize
  • Color settings
  • Custom Fields On Add Listing Page

Shortcodes

  • Add Listing Page
  • All Listings Page
  • Single Category Page
  • Tags Page
  • All Locations Page
  • Search Results
  • Login and Registration
  • Payment & Checkout Page
  • All Categories Page
  • Single Location Page
  • Search Listings
  • User Dashboard
  • Author Profile
  • All Authors

Advanced Settings

  • Search Engine Optimization (SEO)
  • Configuring Maps
  • Review Management
  • Translating Directorist
  • Map View
  • Help and Support
  • Sending Announcements

Developers Guide

  • Action Hooks
  • Filter Hooks
  • Template Override

Articles

  • How to perform a plugin conflict test

Directory Builder

  • Form and Layout Builder
  • Single Listings Layout
  • Multiple Directories
  • All Listing Card Layout
  • Search Form Layout
  • Custom Single Listing Page
Template Override

What is template overriding?

Template overriding refers to customizing a template file without making changes to the core file. Generally, when you make changes to the core file, a new plugin update overrides all of your changes. Directorist offers a robust templating system that allows you to override all the Directorist default template files without amending any of the plugin codes.

How does it work? Simply, you need to copy the template files located in wp-content →plugins→directorist→templates and paste it into your theme folder retaining the folder structure. Follow along for a detailed guideline.

How to override a template?

To override a template, navigate to wp-content →plugins→directorist→templates. Now, for example, you want to customize the Author Profile page's → "about" section which is located in wp-content →plugins→directorist→templates→author→about.php.

First, copy the file.

Then Go to wp-content→themes folder.

Navigate to your themes folder, in my case it is twentytwenty. Create a new folder, directorist then create another folder with the same name of the copied file's folder → in my case its author, since "about.php" is located in the author folder.

Paste the copied file into the newly created folder directorist → author.

So, your new theme template path would be wp content→themes→yourtheme→directorist→author→about.php.

Path of the default template file in the plugin folder
Path of the new template file in the theme folder
/wp-content/plugins/directorist/templates/author/about.php/wp-content/themes/yourtheme/directorist/author/about.php

That is it! Now you can customize your new template file without changing the default files and updates will not have any effect on your customization.

*Note - Templates may update over time with new features. To avail of the new template functionalities, you need to copy the updated template file and replace the old file in your theme. So, make sure to keep a backup of your custom codes so you can add the code to the updated file. 

Last Updated: April 22nd, 2021

Related Article

  • Filter Hooks
  • Action Hooks

© 2023 All rights reserved