alleyinteractive / alleyinteractive/wp-seo

Sitemaps: Generate List of Yearly Sitemaps for robots.txt

Abierto
#174 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
PHP
Estrellas
45
Forks
13
Merge medio
12 d 16 h
PR fusionados (30 d)
5

Descripción

### Description

I would like to be able to visit robots.txt on a site running this plugin and see a list of sitemaps broken down by content type and year.

For example:

```
Sitemap: sitemap-posts-2026.xml
Sitemap: sitemap-posts-2025.xml
Sitemap: sitemap-pages-2026.xml
```

Yearly sitemap indexes should be generated for each content type that is enabled in the sitemap feature.

Here is an example query that yields this data along with the most recent modified date for a post in that post type:

```sql
SELECT YEAR(post_date) AS year,
MAX(post_modified) AS last_modified
FROM wp_posts
WHERE post_type = 'post'
AND post_status = 'publish'
GROUP BY YEAR(post_date)
ORDER BY year
```

### Use Case

Search engines should be able to read the list of sitemap indexes per post type and year from robots.txt.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.