• Resolved hrwheeler

    (@hrwheeler)


    The FAQs mention that the plugin will automatically detect and use a custom template if you create one. Is there a specific way these need to be named or something for the plugin to do so? Have created custom templates for both staff-list.php and single-staff-member-content.php, but the default template is still in use unless I go in and change the template path in staff-directory.php
    Would prefer not to have to do it that way, as it would get wiped with any future plugin updates.

    Thanks!

    https://ww.wp.xz.cn/plugins/staff-directory-pro/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ghuger

    (@ghuger)

    Hi Wendy!

    Although we are not usually able to monitor these forums for support questions, this is a great question and I suspect others will want to know. I’ve emailed you as well with the same information.

    Yes: the template files must have a specific name, and they need to be in the root folder of your theme.

    For example, if you wanted to customize the single-staff-member-content.php template, you would:

    1) Navigate to /wp-content/plugins/staff-directory-pro/templates/, and save a copy of single-staff-member-content.php

    2) Modify this copy of single-staff-member-content.php however you like

    3) Upload your modified copy of single-staff-member-content.php to the *root folder* of your theme. For example, with the twentyfifteen theme, your customized template file would live at /wp-content/themes/twentyfifteen/single-staff-member-content.php

    Its important that you place the modified template inside of the root folder of your theme – we will not be able to detect it from any other location. This could be confusing, because in our plugin the templates all live in the “templates” folder, whereas in your theme they need to be in the theme’s root folder.

    I hope that helps!

    All the best,
    George

    Thread Starter hrwheeler

    (@hrwheeler)

    Thank you — this works perfectly!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom template not detected’ is closed to new replies.