Title: WP_Rewrite::get_feed_permastruct
Published: April 25, 2014
Last modified: May 20, 2026

---

# WP_Rewrite::get_feed_permastruct(): string|false

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_rewrite/get_feed_permastruct/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/classes/wp_rewrite/get_feed_permastruct/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_rewrite/get_feed_permastruct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rewrite/get_feed_permastruct/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_rewrite/get_feed_permastruct/?output_format=md#changelog)

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

Retrieves the feed permalink structure.

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

The permalink structure is root property, feed base, and finally ‘/%feed%’. Will
set the feed_structure property and then return it without attempting to set the
value again.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_rewrite/get_feed_permastruct/?output_format=md#return)󠁿

 string|false Feed permalink structure on success, false on failure.

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

    ```php
    public function get_feed_permastruct() {
    	if ( isset( $this->feed_structure ) ) {
    		return $this->feed_structure;
    	}

    	if ( empty( $this->permalink_structure ) ) {
    		$this->feed_structure = '';
    		return false;
    	}

    	$this->feed_structure = $this->root . $this->feed_base . '/%feed%';

    	return $this->feed_structure;
    }
    ```

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

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

| Used by | Description | 
| [get_feed_link()](https://developer.wordpress.org/reference/functions/get_feed_link/)`wp-includes/link-template.php` |

Retrieves the permalink for the feed type.

  |

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

| Version | Description | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

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