Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ description: An overview of how description tags work in Yoast SEO.

Every public page on a website should contain a unique, useful editorial summary of the content/purpose of that page, output in a _meta description_ tag.

A valid meta description tag takes the following format: `<meta name="description" content="{{VALUE}}" />`.
A valid meta description tag takes the following format: `<meta name="description" content="{{value}}" />`.

## Constructing {{values}}
## Constructing `{{value}}`

### User-specified patterns
Whenever the user has defined a pattern/template for meta description values (e.g., using Yoast SEO's replacement variables), that pattern should be used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ title: "Yoast SEO Meta robots: Functional specification"
sidebar_label: Specification
description: An overview of how meta robots tags work in Yoast SEO.
---
Yoast SEO always outputs a _meta robots_ tag in the `<head>` of every page. When a user wishes to proactively restrict the crawling, indexing, or presentation of a page by search engines (via our [controls](/features/controls/overview.md), we alter the content of that tag.
Yoast SEO always outputs a _meta robots_ tag in the `<head>` of every page. When a user wishes to proactively restrict the crawling, indexing, or presentation of a page by search engines (via our [controls](/features/controls/overview.md)), we alter the content of that tag.

The tag takes the following format: `<meta name="robots" content="{{values}}" />`.

## Constructing {{values}}
## Constructing `{{values}}`
Given that a meta robots tag may have multiple (potentially conflicting) values, and that multiple overlapping conditions may apply, then:

* All conditions should be evaluated and the resultant tag values combined additively, for each agent, using the rules defined below (see _Resolving conflict_).
Expand Down
12 changes: 6 additions & 6 deletions docs/features/xml-sitemaps/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ add_filter( 'wpseo_exclude_from_sitemap_by_post_ids', 'exclude_posts_from_xml_si
* @param boolean $excluded Whether the post type is excluded by default.
* @param string $post_type The post type to exclude.
*
* @return bool Whether or not a given post type should be excluded.
* @return bool Whether a given post type should be excluded.
*/
function sitemap_exclude_post_type( $excluded, $post_type ) {
return $post_type === 'recipes';
Expand All @@ -49,7 +49,7 @@ add_filter( 'wpseo_sitemap_exclude_post_type', 'sitemap_exclude_post_type', 10,
* @param boolean $excluded Whether the taxonomy is excluded by default.
* @param string $taxonomy The taxonomy to exclude.
*
* @return bool Whether or not a given taxonomy should be excluded.
* @return bool Whether a given taxonomy should be excluded.
*/
function sitemap_exclude_taxonomy( $excluded, $taxonomy ) {
return $taxonomy === 'ingredients';
Expand Down Expand Up @@ -127,7 +127,7 @@ add_action( 'init', 'enable_custom_sitemap' );
function add_sitemap_custom_items( $sitemap_custom_items ) {
$sitemap_custom_items .= '
<sitemap>
<loc>http://www.example.com/external-sitemap-1.xml</loc>
<loc>https://www.example.com/external-sitemap-1.xml</loc>
<lastmod>2017-05-22T23:12:27+00:00</lastmod>
</sitemap>';
return $sitemap_custom_items;
Expand Down Expand Up @@ -195,7 +195,7 @@ function filter_wpseo_sitemap_urlimages_front_page( $images ) {
add_filter( 'wpseo_sitemap_urlimages_front_page', 'filter_wpseo_sitemap_urlimages_front_page' );
```

## Misc
## Miscellaneous

### Alter the URL of an entry
```php
Expand Down Expand Up @@ -232,7 +232,7 @@ add_filter( 'wpseo_xml_sitemap_post_url', 'sitemap_post_url', 10, 2 );
add_filter( 'wpseo_sitemap_entries_per_page', 'max_entries_per_sitemap' );
```

### Add extra properties to the <video:video> container
### Add extra properties to the `<video:video>` container
```php
/**
* Adds an example <video:live> property to a <video:video> container for a particular post
Expand All @@ -258,7 +258,7 @@ add_filter( 'wpseo_sitemap_entries_per_page', 'max_entries_per_sitemap' );
add_filter( 'wpseo_video_item', 'add_video_live_property', 10, 2 );
```

### Filter the urlset element.
### Filter the `urlset` element
For instance, if you want to use xhtml:link elements in your XML sitemap to add, for instance, hreflang markup, you could do the following:
```php
/**
Expand Down
Loading