Title: Walker::start_el
Published: April 25, 2014
Last modified: April 28, 2025

---

# Walker::start_el( string $output, object $data_object, int $depth, array $args = array(), int $current_object_id )

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#parameters)
 * [More Information](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#wp--skip-link--target)

Starts the element output.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#description)󠁿

The $args parameter holds additional values that may be used with the child class
methods. Also includes the element output.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#parameters)󠁿

 `$output`stringrequired

Used to append additional content (passed by reference).

`$data_object`objectrequired

The data object.

`$depth`intrequired

Depth of the item.

`$args`arrayoptional

An array of additional arguments.

Default:`array()`

`$current_object_id`intoptional

ID of the current item. Default 0.

## 󠀁[More Information](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#more-information)󠁿

This method is **abstract** and should be explicitly defined in the child class,
as needed. Also note that $output is passed by reference, so any changes made to
the variable within the following methods are automatically handled (no return, 
echo, or print needed).

“Start Element”. Generally, this method is used to add the opening HTML tag for 
a single tree item (such as <li>, <span>, or <a>) to $output.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#source)󠁿

    ```php
    public function start_el( &$output, $data_object, $depth = 0, $args = array(), $current_object_id = 0 ) {}
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-walker.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-walker.php#L96)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-walker.php#L96-L96)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#related)󠁿

| Used by | Description | 
| [Walker::display_element()](https://developer.wordpress.org/reference/classes/walker/display_element/)`wp-includes/class-wp-walker.php` |

Traverses elements to create list from elements.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/walker/start_el/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.9.0](https://developer.wordpress.org/reference/since/5.9.0/) | Renamed `$object` (a PHP reserved keyword) to `$data_object` for PHP 8 named parameter support. | 
| [2.1.0](https://developer.wordpress.org/reference/since/2.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwalker%2Fstart_el%2F)
before being able to contribute a note or feedback.