Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-11-30 21:22:04

jrmartin
Member
Registered: 2013-03-07
Posts: 74

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

#2 2018-11-30 22:46:10

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,160
Website

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

#3 2018-12-01 13:10:07

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,093
Website

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

#4 2018-12-13 15:45:10

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
Website

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? ;)


The text persuades, the *notes prove。

Offline

#5 2018-12-13 15:49:42

jrmartin
Member
Registered: 2013-03-07
Posts: 74

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

Board footer

Powered by FluxBB