Don't index specific pages?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Don't index specific pages?

This topic contains 2 replies, has 2 voices, and was last updated by PCC76 PCC76 3 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #30110

    Hi. I have a problem that is occurring with pages that have large tables on them. (see uploaded error message screenshot)
    There are very large tables on the page via a short-code from the plugin wpDataTables, I was wondering if there is a way to specify pages not to be index?
    Otherwise the only way I can think to stop this is to make a separate post type and don’t index it at all.

    Kind regards

    You must be logged in to view attached files.
    Ernest Marcinko
    Ernest Marcinko


    Well, there is no option on the back-end to ignore them, but if you don’t need the table contents at all, you can specify the datatables shortcode to be ingored completely:

    Another option is only programmatical. Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    add_filter('asp_post_content_before_tokenize_clear', 'asp_ignore_ids_content_index', 10, 2);
    function asp_ignore_ids_content_index( $content, $post ) {
    	$ids_to_ignore = array(1, 2, 3);		// Comma separated list of post/page/CPT ids
    	if ( in_array($post->ID, $ids_to_ignore) ) {
    		return '';
    	return $content;

    Change the $ids_to_ignore variable to add the post/page or other custom post type IDs to be ignored by the content indexer.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    Thank you for your help. I will try the advanced menu options.
    Is there a way to wildcard or will it pick up anything from before the =, i.e this is a shortcode
    [table id=1 /]

    Could i put table_id, and it would ignore all following table numbers??

    • This reply was modified 3 years, 5 months ago by PCC76 PCC76.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.