How can I find the file of codes in Wordpress

by mdjwel
3 replies
  • WEB DESIGN
  • |
Please take a look at the screenshot at first.



When I inspect by inspect element in my wp site, there show only the css file location and line number. But not showing the content/code location. How can I find the file to edit the codes?
#codes #file #find #wordpress
  • Profile picture of the author KirkMcD
    It's built from the templates.
    What are you trying to do?
    {{ DiscussionBoard.errors[9883111].message }}
  • Profile picture of the author David V
    KirkMcD is correct.

    Depending on what page/post/etc.. your on will determine the template.

    Also the theme your using and whether the author created custom templates.

    Here is a good image/map of the WordPress template hierarchy.

    Clicking any of the links on the map will take you to the WP Codex for details.

    Follow the flow, compare that to your theme files, and you should be able to tell what template is being used on a given url.

    .
    {{ DiscussionBoard.errors[9883165].message }}
  • Profile picture of the author fajrtechnologies
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[9885453].message }}
    • Profile picture of the author Zenoth
      From your screenshot, I realize that the code you are looking for it's generated by a widget.

      So, it's probably a custom widget registered by your theme. However, you won't find the exact code even if you find that widget.

      WordPress uses wp_nav_menu() function to automatically generate the code for menus.

      Look among your active theme files. Start with functions.php file and look for any required files, or some code that registers a custom widget.
      {{ DiscussionBoard.errors[9886069].message }}

Trending Topics