---
title: Agregar URL externas a mapas de sitio de índice XML
url: "https://www.seopress.org/es/soporte/hooks/agregar-url-externas-a-mapas-de-sitio-de-indice-xml/"
lang: es
updated: 2021-09-29
hook_name: seopress_sitemaps_external_link
required_version: 3.8.6
---

# Agregar URL externas a mapas de sitio de índice XML

- **Hook name:** `seopress_sitemaps_external_link`
- **Required version:** 3.8.6

```php
function sp_sitemaps_external_link($custom_sitemap) {
	$custom_sitemap = 
		[ 0 => [
			'sitemap_url' 		=> 'https://example.com/',
			'sitemap_last_mod' 	=> '1989-10-08T01:23:45+00:00'
		],
		1 => [
			'sitemap_url' 		=> 'https://example.com/',
			'sitemap_last_mod' 	=> '1989-10-08T01:23:45+00:00'
		]
	];
	return $custom_sitemap;
}
add_filter('seopress_sitemaps_external_link', 'sp_sitemaps_external_link');
```

Source: [https://gist.github.com/wp-seopress/9df5338d385fc372ee52498fe70363a9](https://gist.github.com/wp-seopress/9df5338d385fc372ee52498fe70363a9)



