I have ‘SEO Search Terms 2’ and ‘WP Super Cache’ installed.
So:
in wp-config.php at the end
1 2 |
# cache 404 add_action( 'wpsupercache_404', function(){return true;} ); |
in 404.php under your theme:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<?php wp_tag_cloud(array('number'=>1000, 'taxonomy'=>'category', 'smallest'=>16, 'largest'=>20, 'unit'=>'px')); if (function_exists('stt_popular_terms_widget')) { $options = array( 'title' => 'Popular Search Terms', 'limit' => 100, 'list' => '0', 'search' => '1' ); echo stt_popular_terms_widget($options); } wp_tag_cloud(array('number'=>1000, 'taxonomy'=>'post_tag', 'smallest'=>1, 'largest'=>1, 'unit'=>'px')); ?> |
Code resource:
http://codex.wordpress.org/Function_Reference/the_widget
http://codex.wordpress.org/Widgets_API#Displaying_Widgets
http://codex.wordpress.org/Widgetizing_Themes
Add Tags, Categories, Incoming Search Terms to 404 Page for WordPress by @sskaje: https://sskaje.me/2014/01/add-tags-categories-incoming-search-terms-404-page/
Link to this post!