Skip to content

Commit

Permalink
update docs with filterable feed name
Browse files Browse the repository at this point in the history
  • Loading branch information
psorensen committed Feb 22, 2024
1 parent 73c6663 commit e6e6ac0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,29 @@ function podcasting_feed_episodes_per_page( $qty ) {

```

## Customize the RSS feed title
The `<title>` element of the RSS feed can be adjusted using the `simple_podcasting_feed_title` filter.

```php
<?php

add_filter( 'simple_podcasting_feed_title', 'podcasting_feed_update_feed_title', 10, 2 );

/**
* Filter the name of the of the feed channel
*
* @param $output Output to be modified.
* @param $term WP_Term object representing the podcast
* @return string
*/
function podcasting_feed_update_feed_title( $output, $term ) {
$term_name = $term->name;

return '10up Presents: ' . $term_name;
}

```

## Customize RSS feed

If you want to modify RSS feed items output, there is a filter for that:
Expand Down

0 comments on commit e6e6ac0

Please sign in to comment.