Automatically recreate the index when new posts are published
-
Hi,
After publishing new posts, I found that I have to recreate the index to actually update which posts are considered related. This becomes especially apparent on blogs with few posts which thus has little content to draw on.
Please recreate the index and clear out the cache automatically for me when publishing new posts. It shouldn’t be necessary to do this manually.
This little addition does the trick for me:
function crp_on_publish_post( $ID, $post ) { crp_delete_index(); crp_cache_delete(); crp_create_index(); } add_action( 'publish_post', 'crp_on_publish_post', 10, 2 );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Automatically recreate the index when new posts are published’ is closed to new replies.