Identify origin of php code

Asked

Viewed 614 times

3

Guys I know the question may seem simple or something like, but so, sometimes I want to edit something specific on the page made in wordpress, and sometimes I do not know where is the origin of that setting among the numerous php files that wordpress Theme I’m using.

It has like inspecting element indicates in which folder or place I can find in php files to be able to edit ?

Why I’m studying some functions and I’m learning how some Hemas work and I’m trying to learn about them.

Ever since I thank.

  • Next, I think by the hard inspector, because it’s only html... Now you can get a specific id (if it is not dynamic) and through an operating system command, search for files that contain what you are looking for.. is an idea

  • It’s because I took everything ready and looking 1 by 1 is complicated, I thought I had some easy way to find, because when it’s not done by us it’s hard to know where each thing is.

  • 1

    See if it helps:https://i.stack.Imgur.com/Wu7ik.png

  • Well, I’m not sure I understand your question. Do you want to know which file you’re editing? You can see the file name by the URL, for example.

  • @Marianaferreira In fact, I’ll give you an example... Pretend I’m in the index of the page and want to change an information there, so by logic it is in the index.php However there are some pages that have some information that I am not finding the source file to edit.

  • Ah, you can give Ctrl+shift+i on the page that will appear html, css, what css files are, the option to see the responsive page and more.

Show 1 more comment

2 answers

1

All themes follow (or should follow) the convention of Wordpress itself, described in this link

for example, if the page you are viewing is a post, it is very likely to be in the file single.php, if it’s a page, page.php

the following image displays possibilities of files for this kind of situation

Hierarquia do template

Remembering that themes can implement structures in different ways.

0

inserir a descrição da imagem aquiYou should inspect the page and find the class you want to edit from, this class you should search using in "Adobe Dreamweaver", so you will find in which php files you are using that same class. I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.