Placeholders
Placeholders are variables in the %name% format. RSS Retriever replaces them with data of the current item. They work in post templates, shortcode parameters, post tags, custom taxonomies, custom fields, image prompts, search queries and the alternative thumbnail source.
Post data
| Placeholder | Replaced with |
|---|---|
%post_title% | Post title. |
%post_content% | Full post content (HTML). |
%post_content[N]% | Content shortened to N words, HTML kept. |
%post_content_notags% | Content without HTML tags. |
%post_content_notags[N]% | Content without tags, shortened to N words. |
%post_excerpt% | Post excerpt (HTML). |
%post_excerpt[N]% | Excerpt shortened to N words, HTML kept. |
%post_excerpt_notags% | Excerpt without HTML tags. |
%post_excerpt_notags[N]% | Excerpt without tags, shortened to N words. |
%post_tags% | Post tags, comma-separated. |
%categories% | Post categories, comma-separated. |
%link% | Link to the original article. |
%post_guid% | The GUID of the feed item. |
%post_date% | Post date and time as YYYY-MM-DD HH:MM:SS. |
%post_date[format]% | Post date in a PHP date format, for example %post_date[Y-m-d]% or %post_date[F j, Y]%. |
AI models charge for every input token. Use %post_content_notags% when the model does not need the HTML, and the [N] versions when a summary of the first paragraphs is enough, for example for titles, tags or meta descriptions.
XML tags and feed data
| Placeholder | Replaced with |
|---|---|
%xml_tags[name]% | The value of the XML tag name of the current item. |
%xml_tags_attr[name][attr]% | The value of the attribute attr of the tag name. |
%params[name]% | The value of a parameter of the feed URL. For https://www.ebay.com/sch/i.html?_nkw=books&_rss=1, %params[_nkw]% returns books. |
%custom_fields[name]% | The value of the custom field name set by the Custom fields rules. |
%media_description% | Description of the attached media, if any (for example the description of a YouTube video). |
%enclosure_url% | URL of the enclosure, if the item has one. |
%media_thumbnail[n]% | URL of the n-th media:thumbnail of the item, counting from 0. |
%media_content[n]% | URL of the n-th media:content of the item, counting from 0. |
The tag names are shown in the XML structure preview of the feed. For a feed item like this:
<item>
<product_name>Desk lamp</product_name>
<price currency="EUR">39.90</price>
</item>
%xml_tags[product_name]% returns Desk lamp and %xml_tags_attr[price][currency]% returns EUR.
Images and video
| Placeholder | Replaced with |
|---|---|
%random_image[keywords]% | URL of a random Creative Commons image found on Google Images for one of the comma-separated keywords. |
%pixabay[keywords]% | URL of a random full-size image from Pixabay for one of the comma-separated keywords. Needs a Pixabay API key. |
%random_file[path]% | URL of a random file from a folder on your server. path is an absolute server path, see WordPress root directory. Example: <img src="%random_file[/home/site/public_html/wp-content/uploads/stock]%">. |
%youtube_video[keyword]% | Embed code of a YouTube video found for the keyword. |
AI placeholders
These placeholders call the Default AI model set in General Settings. Each one is an API request.
| Placeholder | Replaced with |
|---|---|
%gpt_prompt[prompt]% | The answer of the AI model to your prompt. The prompt can contain other placeholders. |
%gpt_keywords% | A comma-separated list of keywords extracted from the article. |
%gpt_keywords_en% | The same keywords in English, whatever the language of the article. |
%gpt_keyphrase% | A short key phrase describing the article. |
%gpt_keyphrase_en% | The key phrase in English. |
%gpt_image_prompt% | A prompt for an image generator, written by analyzing the article. With Batch insert, a separate prompt is written for every text section an image is inserted before. |
English keywords are handy for image and video searches, which usually give better results in English.
Nesting placeholders
A placeholder can contain other placeholders. A YouTube video about the post title:
%youtube_video[%post_title%]%
A video found with a search phrase written by AI:
%youtube_video[%gpt_prompt[Give a short YouTube search phrase for this article. Return only the phrase: %post_content_notags[200]%]%]%
Here %gpt_prompt[]% reads the article without tags and returns a search phrase, which %youtube_video[]% uses to find and embed a video. A %gpt_prompt[]% cannot contain another %gpt_prompt[]%.