Title: where is the PHP code that generates an element?
Last modified: March 12, 2020

---

# where is the PHP code that generates an element?

 *  [reti](https://wordpress.org/support/users/reti/)
 * (@reti)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/where-is-the-php-code-that-generates-an-element/)
 * When I’m interested in CSS/HTML/JS of some element on the site, I preview it 
   and test modifications in the browser devtools. It is clear to me here. And how
   is it in PHP? I have a page placed on WordPress and I’m interested in some element.
   I would like to find out where is the PHP code that generated this element. Then
   I’d like to modify this code and view the changes. What’s the smartest way to
   do that?
 * I know I need files in Design -> Theme editor. I also use child theme. I implemented
   some JS scripts in functions.php. Now I’m interested in e.g. element containing
   information about the author in main collection and single post. Or another issue:
   in editing the post we have the “author” field. As an alternative I’d like to
   add another field called “added by” (many of my posts are only links with short
   description, so it’s hard to talk about authorship here). I understand that I’m
   entering the WordPress Development area. I have no complete idea how to start.
   Courses, manuals, documentation? How should I start exactly?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [6 years, 5 months ago](https://wordpress.org/support/topic/where-is-the-php-code-that-generates-an-element/#post-12534347)
 * I use the plugin “show current template” when developing because it shows all
   of the templates used to render the current page.
 * I would be remiss if I failed to shout DON’T TOUCH CORE FILES. If you think you
   need to modify core, learn about hooks, filters, and actions. If you want to 
   modify theme files, work in a child theme and use version control.
    -  This reply was modified 6 years, 5 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [reti](https://wordpress.org/support/users/reti/)
 * (@reti)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/where-is-the-php-code-that-generates-an-element/#post-12535500)
 * Thank you very much for your answer. Look at the [screenshot](http://srv19859.microhost.com.pl/2020-03-12_10h07_14.jpg).
   If I understand correctly, this plugin creates a list of all PHP files used on
   the page I’m browsing. Honestly, it’s still looking for a needle in a haystack.
   I need a solution that gives me as much comfort as devtools for HTML/CSS/JS inspection.
   I marked with a red rectangle the element that interests me. Now I want to know
   exactly where it came from.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [6 years, 5 months ago](https://wordpress.org/support/topic/where-is-the-php-code-that-generates-an-element/#post-12536434)
 * You’re going to need to “walk the code”.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘where is the PHP code that generates an element?’ is closed to new replies.

## Tags

 * [beginner](https://wordpress.org/support/topic-tag/beginner/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/where-is-the-php-code-that-generates-an-element/#post-12536434)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
