• Resolved lacroix99

    (@lacroix99)


    Hello,
    i would like to overwrite some templates in an own plugin, because we are using the child theme for different pages and we want to divide function and design.

    I found this site in the documentation: https://wpjobmanager.com/document/template-overrides/
    where there is a short explanation to call the functions of the filter hook:
    return apply_filters( ‘job_manager_locate_template’, $template, $template_name, $template_path );

    Cann you give me an example on how to set the attribute values? this is really unclear/missing documentation and i can’t find the filter hook in the core code. How to set:

    $template, –> what should this be?
    $template_name, –> with .php or not?
    $template_path –> full path or what?

    Thank you,
    PS

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Jen H. (a11n)

    (@jenhooks)

    Hi @lacroix99,

    One of our developers wrote up a small plugin for you. You can download the .zip file here:

    https://cld.wthms.co/vNI2w5

    It shows how to do this with the job-filters.php template.

    The $template argument is path where WP Job Manager would normally find the template — you should return that if you don’t have a custom one.

    $template_name is the requested template file (with .php extension) and $template_path is the “namespace” for the template. Different WPJM paid extensions use different namespaces. By default, core uses “job_manager”.

    Please let us know if you have any other questions.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    I’m marking this thread as Resolved as it’s been more than a month since the last reply. If you still need help, please do reply again and mark the thread as Unresolved!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Overwrite Templates in Plugin’ is closed to new replies.