Custom Table
-
Hello
I am trying to add custom tables to Relevanssi but it is not working.
I am using this filteradd_filter( 'relevanssi_content_to_index', 'rlv_add_extra_content', 10, 2 ); function rlv_add_extra_content( $content, $post ) { global $wpdb; $data = $wpdb->get_results( "SELECT title, title2, title3 FROM wp_test_title WHERE ID = $post->ID", ARRAY_A ); if ( ! empty( $data[0] ) ) { $values = array_values( $data[0] ); $content .= join( ' ', $values ); } return $content; }
I have tested the code, it is working properly, i have tried indexing many times but there doesn’t seem to be any change.
Thank you
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom Table’ is closed to new replies.