Where to find the template parts

I created a child theme to move templates to for editing.

I can not find the templates I want to edit. I have changes I want to make to the especially to listing page (the look, feel and colors of individual locations I enter). I also have changes to the listing categories, but all I can locate is the ‘listing-category-header.php’.

I am clearly missing something simple and easy and I apologize for being new and naive. I searched the topics and ‘google’ in general but can not locate anything I am doing wrong.

The ‘how to edit templates’ video is great but I am not finding the individual components shown in the video. I have a picture of my directory (I hope it displays correctly) so you can just tell me where to go with it.

Thanks so very much for assisting.

listinghive directory

Hi,

All the default template parts are located in wp-content/plugins/hivepress/templates folder. If you copy the template part to the child theme’s “hivepress” subfolder, keeping the file path (relative to the wp-content/plugins/hivepress/templates) then it’ll have a higher priority. It works in the same way as in WooCommerce Template structure & Overriding templates via a theme - WooCommerce

Editing whole layouts instead of template parts or adding custom template parts is possible with the code snippets for hivepress/v1/templates/{template_name} hooks, you can check some samples here Search · user:hivepress hivepress/v1/templates · GitHub

If you want to edit styling (e.g. colors, spacing, fonts) I recommend to avoid overriding templates and PHP code snippets, it’s possible to customize styling using CSS only.

Hope this helps.

1 Like

Actually it does not because I can not located the templates in the sub folders. That is the entire problem.

Thanks anyway

All the template parts are located in the plugin (not the theme) hivepress/templates directory hivepress/templates at master · hivepress/hivepress · GitHub For example, all the template parts related to the listing block and page in the “view” context can be found here hivepress/templates/listing/view at master · hivepress/hivepress · GitHub e.g. if you want to override the listing verified badge, you can copy hivepress/templates/listing/view/listing-verified-badge.php file to child-theme-folder/hivepress/listing/view folder and it’ll override the default template part.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.