Avatar of sabecs
sabecs
 asked on

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

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?
WordPress

Avatar of undefined
Last Comment
sabecs

8/22/2022 - Mon
Banshi lal dangi

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
sabecs

ASKER
Thanks, I can't see any category or archive files, would they be in my themes folder?  please refer attachedfile list
Banshi lal dangi

If there is no any category file, it means Index.php is being used there.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
sabecs

ASKER
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?
ASKER CERTIFIED SOLUTION
Banshi lal dangi

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
sabecs

ASKER
Thanks again for your help.