Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How to search for missing meta description?
The subject says it all. I have a site that’s been around for ages, and I keep finding blank description boxes. I’d like to find them all and fix them.
james
Offline
Re: How to search for missing meta description?
I’m not sure whether you can do that specifically from the admin area but you could:
1) Create a temporary section and put the following in it:
<txp:article_custom section="mysection" limit="999" break="br" wraptag="" sort="ID desc">
<txp:if_first_article>"ID","meta_description"</txp:if_first_article>
"<txp:article_id />","<txp:meta_description format="" />"
</txp:article_custom>
and then copy the output into a text file, save that as a .csv file and open that in your favourite spreadsheet program. That gives you a table with all the entries that you can sort by the meta_description column.
If you just want a list of the missing article ID#s, use:
<txp:article_custom section="mysection" limit="999" break="br" wraptag="" sort="ID desc">
<txp:variable name="article_meta"><txp:meta_description format="" /></txp:variable>
<txp:if_variable name="article_meta" value=""><txp:article_id /></txp:if_variable>
</txp:article_custom>
You can, of course, add txp:title or txp:article_url_title to the output if you need some more cues.
2) Look at the database in phpMyAdmin or another program like SequelPro and enter the following query:
SELECT ID FROM textpattern WHERE description = "";
Again if you want more infos, you can do SELECT ID, Title FROM …
to get the titles too.
TXP Builders – finely-crafted code, design and txp
Offline
Re: How to search for missing meta description?
You can use Google Search Console for tracking down missing/bad meta descriptions sitewide. Just set you site up in it, wait a few days for site data to appear, and then go to the HTML improvements section and view issues.
Or there are apps which can scan your whole site and generate reports on this and all manner of other issues such as broken links and suchlike. One example is Integrity
Offline
Re: How to search for missing meta description?
I still haven’t used adi_matrix yet, but if I understand its abilities, you could install that plugin, create a custom matrix for the Articles panel with one column being the Meta > Description field, and boom. Easy display of which articles with an empty field and quick access to fix them.
You are customizing descriptions for each article, right? ;)
Offline
Re: How to search for missing meta description?
Yes, of course, but the problem is that my site is very old, and now I’m using the built-in meta description and with all the updates some posts out of 1157 are missing meta descriptions. I’m slowly finding them. I’ll try adi_matrix.
Thanks all!
james
Offline