WordPress.org

Support

Support » Themes and Templates » Template Tag Location

Template Tag Location

Viewing 14 replies - 1 through 14 (of 14 total)
  • In the /wp-includes folder there are a bunch of files named things like template-function.php, etc., etc. Look in these and you should be able to find all the source code for the template functions. You could also just look at the Codex for descriptions of how they operate:
    http://codex.wordpress.org/Template_Tags

    You can ask where a particular one is hiding in the source. Some of us have lightning-fast search reflexes. ;)

    wp_list_pages is an example of one of the tags that I am looking for in the source code but I’m don’t know what *.php file it is defined in.

    I could search through every wordpress source file – I just thought someone may already know off the top of their head the file that I’m looking for – saving me a whole lot of search time.

    thanks

    Well with the right tool there is no search time involved.

    “wp_list_pages”

    template-functions-post.php – around line 300.

    And I’m with Root. A good text search utility is always on a source hacker’s toolbelt.

    can you guys suggest a good search utility?

    Ideally you want a text editor with it built in. Depends on your tastes and platform. Loads of free editors all over.

    Do the search utilities that you are talking about search for text in a file that is loaded into the utility itself, or, does the utility search your entire hard drive for a certain text string inside of any file (like a *.php file)

    And can you recommend a good text search utility.

    I use PSPad

    Regarding the template tags issue – I’m still a bit confused here (and I hope that I don’t sound too lame here)

    When coding a website using HTML, you simply add the HTML tag to an HTML page and your browser displays the results. The tag itself is not defined in your file – the tag is interpreted by the browser right?

    On the other hand, I take it that all the template tags that are listed on the codex site need to be defined individually inside of the WordPress source code? Is that correct?

    For example, if WordPress lacks a certain template tag feature and a new one is created, does the new tag have to be defined with WordPress in order to work?

    It depends how you want to call it. One is a pre defined function. The other would be a plugin.

    Can we go back one step and ask: Why do you need this? What do want to do ?

    In WP 1.5, Categories and Archives can be made to appear in a dropdown list – but “Pages” cannot.

    I’ve asked for a “dropdown_pages” tag to be included in WP but that could take some time before the next WP update comes out – and who knows if the requested feature will be included.

    I don’t know anything about php coding – so I cannot create my own plugins ( I wish I could ) but I’m trying to learn how template tags works to see if I can figure out a way to get my “Pages” to appear in a dropdown list.

    With you. Now you have set out the challenge clearly lets hope a php guru finds it irresistible. Could be useful.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Template Tag Location’ is closed to new replies.
Skip to toolbar