Note: You are viewing the documentation for Version 3View Version 4 Docs

Documentation

View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Available since: 1.0.10

searchwp_enable_parent_attribution_{post_type}

SearchWP allows you to configure search engines to attribute result weight to a post’s parent. This is exceptionally useful when integrating Media into search results and telling SearchWP to attribute any weight generated by Media to be attributed to the post to which it was uploaded. It also a big part of what makes the bbPress Extension so great; you can have Reply weight be applied directly to it’s parent Topic.

Example: To tell SearchWP to allow parent attribution for bbPress’ Topic and Reply post types, add the following to your active theme’s functions.php:

<?php
add_filter( 'searchwp_enable_parent_attribution_topic', '__return_true' );
add_filter( 'searchwp_enable_parent_attribution_reply', '__return_true' );
view raw gistfile1.php hosted with ❤ by GitHub
Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP