Title: do_feed_atom
Published: April 25, 2014
Last modified: February 24, 2026

---

# do_feed_atom( bool $for_comments )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/do_feed_atom/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/do_feed_atom/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/do_feed_atom/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/do_feed_atom/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/do_feed_atom/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/do_feed_atom/?output_format=md#changelog)

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

Loads either Atom comment feed or Atom posts feed.

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

### 󠀁[See also](https://developer.wordpress.org/reference/functions/do_feed_atom/?output_format=md#see-also)󠁿

 * [load_template()](https://developer.wordpress.org/reference/functions/load_template/)

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

 `$for_comments`boolrequired

True for the comment feed, false for normal feed.

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

    ```php
    function do_feed_atom( $for_comments ) {
    	if ( $for_comments ) {
    		load_template( ABSPATH . WPINC . '/feed-atom-comments.php' );
    	} else {
    		load_template( ABSPATH . WPINC . '/feed-atom.php' );
    	}
    }
    ```

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

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

| Uses | Description | 
| [load_template()](https://developer.wordpress.org/reference/functions/load_template/)`wp-includes/template.php` |

Requires the template file with WordPress environment.

  |

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

| Version | Description | 
| [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%2Ffunctions%2Fdo_feed_atom%2F)
before being able to contribute a note or feedback.