Filters - MurhafSousli/ngx-wordpress GitHub Wiki

The plugin allow data modification before the emitting the data through collection/model state

You can map the data response before the state, you would use this if you want to manipulate the data before rendering the state, for example remove links from post excerpts

export const titleFilter = map(({key, value}: WpFilterRes<WpPost>): WpFilterRes<string> => {
  console.log('post data', value);
  return {
     key,
     value: value[key].rendered + ' test'
  };
});

WordPressModule.forRoot({
  baseUrl: 'https://my-wordpress-site.com',
  filters: {
    posts: {
      title: titleFilter
    }   
  }
}),
⚠️ **GitHub.com Fallback** ⚠️