Make Wordpress direct access to a PHP file in the theme

0

I have the following need:

I have some pages called "Diagnostics" on my website in Wordpress. However, WP's standard features do not allow you to do what you want. I need to do some calculations on these diagnostics, and I can get them out of WP, with common PHP same.

However, how can I do for WP to direct, for example, the page "/ diagnostics / process-diagnostics" to /wp-content/themes/meutema/prognostics.php"?

    
asked by anonymous 21.08.2018 / 19:40

1 answer

1

You just create a page template with the file "diagnostico-de-procesos.php". You just need to put the following comment at the beginning of the file:

/**
 * Template name: Página de Diagnósticos
 */

In the wordpress panel you edit the "/ diagnostics / process-diagnostics" page and select the template : Diagnostics page. So wordpress will understand that you will use the "diagnostico-de-procesos.php" file to render the page you want.

    
22.08.2018 / 16:45