I’ve written a wordpress plug-in that automatically generates table of contents for my posts. It generates the TOC only if it sees [[toc]] tag in the post contents. When it sees the tag, it generates the TOC and puts it instead of the tag.
I ran into this problem and I was wondering how is it possible. My plug-in processes all posts and pages and doesn’t leave the [[toc]] tag in any case I am aware of. Yet, somehow, google managed to cache post contents containing the tag.
Take this search for example: http://www.google.com/search?hl=en&q=tcpdump+for+dummies&cts=1245875926331&aq=f&oq=&aqi=g%3Ap1
tcpdump for dummies is the name of an article on my blog. Note that the article excerpt google presents contains [[notoc]] and [[toc]]. Both are tags that my plug-in removes – you can see it in the original article: http://www.alexonlinux.com/tcpdump-for-dummies
In the plug-in, I use
add_filter(‘the_content’, ‘smart_toc_filter’, 6);
to register the plug-in. This means that my plug-in should process all posts under any conditions, isn’t it?
- The topic ‘Google accesses post before it has been processed by plugins?’ is closed to new replies.