Skip to main content

Well, if all you want is to check which template file has been used to generate the current page then you don't need to get your hands dirty with code ;)

There's this handy plugin called Debug Bar. It's a great helper in many situations including yours. You should definitely check it out - for me and many others it's a must-have companion for any WP development.

I've attached a screenshot that could make you fall in love...

enter image description here

To get the Debug Bar working, you need to enable wp_debug and wp_savequeries options. These options are in disabled state by default.

Before you make any changes though, there are a few points to keep in mind:

  • Do not do it in production environment unless the website doesn't cater to a lot of traffic.
  • Once you finish debugging, ensure to disable the options (especially the wp_savequeries option since it affects the performance) of the website.

To make the changes:

  1. Open wp_config.php file through a ftp client.
  2. Search for wp_debug option. Edit it to define( 'WP_DEBUG', falsetrue );. If the line is not present, add it to the file.
  3. Similarly, edit or add the line define( 'SAVEQUERIES', true ); to the file.
  4. Save. You are ready to debug.

More info: Codex

Well, if all you want is to check which template file has been used to generate the current page then you don't need to get your hands dirty with code ;)

There's this handy plugin called Debug Bar. It's a great helper in many situations including yours. You should definitely check it out - for me and many others it's a must-have companion for any WP development.

I've attached a screenshot that could make you fall in love...

enter image description here

To get the Debug Bar working, you need to enable wp_debug and wp_savequeries options. These options are in disabled state by default.

Before you make any changes though, there are a few points to keep in mind:

  • Do not do it in production environment unless the website doesn't cater to a lot of traffic.
  • Once you finish debugging, ensure to disable the options (especially the wp_savequeries option since it affects the performance) of the website.

To make the changes:

  1. Open wp_config.php file through a ftp client.
  2. Search for wp_debug option. Edit it to define( 'WP_DEBUG', false );. If the line is not present, add it to the file.
  3. Similarly, edit or add the line define( 'SAVEQUERIES', true ); to the file.
  4. Save. You are ready to debug.

More info: Codex

Well, if all you want is to check which template file has been used to generate the current page then you don't need to get your hands dirty with code ;)

There's this handy plugin called Debug Bar. It's a great helper in many situations including yours. You should definitely check it out - for me and many others it's a must-have companion for any WP development.

I've attached a screenshot that could make you fall in love...

enter image description here

To get the Debug Bar working, you need to enable wp_debug and wp_savequeries options. These options are in disabled state by default.

Before you make any changes though, there are a few points to keep in mind:

  • Do not do it in production environment unless the website doesn't cater to a lot of traffic.
  • Once you finish debugging, ensure to disable the options (especially the wp_savequeries option since it affects the performance) of the website.

To make the changes:

  1. Open wp_config.php file through a ftp client.
  2. Search for wp_debug option. Edit it to define( 'WP_DEBUG', true );. If the line is not present, add it to the file.
  3. Similarly, edit or add the line define( 'SAVEQUERIES', true ); to the file.
  4. Save. You are ready to debug.

More info: Codex

Explained some modifications to be made in wp_config to get the debug bar working.
Source Link

Well, if all you want is to check which template file has been used to generate the current page then you don't need to get your hands dirty with code ;)

There's this handy plugin called Debug Bar. It's a great helper in many situations including yours. You should definitely check it out - for me and many others it's a must-have companion for any WP development.

I've attached a screenshot that could make you fall in love...

enter image description here

To get the Debug Bar working, you need to enable wp_debug and wp_savequeries options. These options are in disabled state by default.

Before you make any changes though, there are a few points to keep in mind:

  • Do not do it in production environment unless the website doesn't cater to a lot of traffic.
  • Once you finish debugging, ensure to disable the options (especially the wp_savequeries option since it affects the performance) of the website.

To make the changes:

  1. Open wp_config.php file through a ftp client.
  2. Search for wp_debug option. Edit it to define( 'WP_DEBUG', false );. If the line is not present, add it to the file.
  3. Similarly, edit or add the line define( 'SAVEQUERIES', true ); to the file.
  4. Save. You are ready to debug.

More info: Codex

Well, if all you want is to check which template file has been used to generate the current page then you don't need to get your hands dirty with code ;)

There's this handy plugin called Debug Bar. It's a great helper in many situations including yours. You should definitely check it out - for me and many others it's a must-have companion for any WP development.

I've attached a screenshot that could make you fall in love...

enter image description here

Well, if all you want is to check which template file has been used to generate the current page then you don't need to get your hands dirty with code ;)

There's this handy plugin called Debug Bar. It's a great helper in many situations including yours. You should definitely check it out - for me and many others it's a must-have companion for any WP development.

I've attached a screenshot that could make you fall in love...

enter image description here

To get the Debug Bar working, you need to enable wp_debug and wp_savequeries options. These options are in disabled state by default.

Before you make any changes though, there are a few points to keep in mind:

  • Do not do it in production environment unless the website doesn't cater to a lot of traffic.
  • Once you finish debugging, ensure to disable the options (especially the wp_savequeries option since it affects the performance) of the website.

To make the changes:

  1. Open wp_config.php file through a ftp client.
  2. Search for wp_debug option. Edit it to define( 'WP_DEBUG', false );. If the line is not present, add it to the file.
  3. Similarly, edit or add the line define( 'SAVEQUERIES', true ); to the file.
  4. Save. You are ready to debug.

More info: Codex

Source Link
Michal Mau
  • 3.4k
  • 2
  • 28
  • 35

Well, if all you want is to check which template file has been used to generate the current page then you don't need to get your hands dirty with code ;)

There's this handy plugin called Debug Bar. It's a great helper in many situations including yours. You should definitely check it out - for me and many others it's a must-have companion for any WP development.

I've attached a screenshot that could make you fall in love...

enter image description here