How do you find which file is being used to generate output in WordPress?

sabecs
sabecs used Ask the Experts™
on
When I view a job category on my website using a link
http://mywebsite.com/job-category/accounting/ 
it displays a sidebar and no footer menu.

How can I work out which file is being called from viewing source code?
And how would I remove the sidebar and add a footer menu that is displayed on the rest of my website?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Banshi lal dangiFull Stack Developer

Commented:
For categories, WordPress looks for the category-{slug}.php file. If it doesn’t exist, WordPress then looks for a file for the next hierarchical level, category-{ID}.php, and so on. If WordPress fails to find any specialized templates or an archive.php template file, it reverts to the default behavior, using index.php.

The category hierarchy is listed below:

  1. category-{slug}.php: For example, if the category’s slug is named “news,” WordPress would look for a file named category-news.php.
  2. category-{ID}.php: For example, if the category’s ID is “6”, WordPress would look for a file named category-6.php.
  3. category.php
  4. archive.php
  5. index.php

Author

Commented:
Thanks, I can't see any category or archive files, would they be in my themes folder?  please refer attachedfile list
Banshi lal dangiFull Stack Developer

Commented:
If there is no any category file, it means Index.php is being used there.
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Author

Commented:
Thanks Banshi for your help, very much appreciated.
If I was to copy index.php from my Divi folder and call it category.php and place it in my child theme and edit as I like would that be called?
Full Stack Developer
Commented:
Yes, certainly. please go through the Category hierarchy I mentioned in above comment.

Author

Commented:
Thanks again for your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial