Title: Instructions for formatting function reference calls?
Last modified: August 19, 2016

---

# Instructions for formatting function reference calls?

 *  [TomJohnson](https://wordpress.org/support/users/tomjohnson/)
 * (@tomjohnson)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/instructions-for-formatting-function-reference-calls/)
 * On almost every function reference info page (such as [wp_list_pages](http://codex.wordpress.org/Template_Tags/wp_list_pages)),
   I see things like this:
 * `<?php wp_list_pages( $args ); ?>`
 * Default Usage
 *     ```
       <?php $args = array(
           'depth'        => 0,
           'show_date'    => ,
           'date_format'  => get_option('date_format'),
           'child_of'     => 0,
           'exclude'      => ,
           'include'      => ,
           'title_li'     => __('Pages'),
           'echo'         => 1,
           'authors'      => ,
           'sort_column'  => 'menu_order, post_title',
           'link_before'  => ,
           'link_after'   => ,
           'exclude_tree' =>  ); ?>
       ```
   
 * But all the examples show the function reference written out in a different way,
   like this:
 *     ```
       <?php wp_list_pages('include=5,9,23&title_li=<h2>' . __('Poetry') . '</h2>' ); ?>
       ```
   
 * Apparently I can also write the function reference using the => and putting everything
   in single quotes, like this:
 *     ```
       <?php wp_list_pages (array('depth'=>'0','link_before'=>'h3','link_after'=>'/h3')); ?>
       ```
   
 * But I’m not very familiar with this second format for writing the function reference.
   Is there any page on the codex that explains how to write out the function reference
   this second way? And why is there a disconnect between the usage and the examples?
   Shouldn’t more of the examples use the => format? Is there an advantage to using
   one over the other?
 * Tom

Viewing 1 replies (of 1 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/instructions-for-formatting-function-reference-calls/#post-1376523)
 * > Is there any page on the codex that explains how to write out the function 
   > reference this second way?
 * See [How_to_Pass_Tag_Parameters](http://codex.wordpress.org/How_to_Pass_Tag_Parameters)

Viewing 1 replies (of 1 total)

The topic ‘Instructions for formatting function reference calls?’ is closed to new
replies.

## Tags

 * [format](https://wordpress.org/support/topic-tag/format/)
 * [template tag](https://wordpress.org/support/topic-tag/template-tag/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/instructions-for-formatting-function-reference-calls/#post-1376523)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
