add_help_tab( array(
'id' => 'relevanssi-searching',
'title' => __( 'Searching', 'relevanssi' ),
'content' => '
' .
// Translators: %1$s is 'orderby', %2$s is the Codex page URL.
'- ' . sprintf( __( "To adjust the post order, you can use the %1\$s query parameter. With %1\$s, you can use multiple layers of different sorting methods. See WordPress Codex for more details on using arrays for orderby.", 'relevanssi' ), '
orderby', 'https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters' ) . ' ' .
'- ' . __( "Inside-word matching is disabled by default, because it increases garbage results that don't really match the search term. If you want to enable it, add the following function to your theme functions.php:", 'relevanssi' ) .
'
add_filter( \'relevanssi_fuzzy_query\', \'rlv_partial_inside_words\' );
function rlv_partial_inside_words( $query ) {
return "(term LIKE \'%#term#%\')";
} ' .
// Translators: %s is 'Uncheck this if you use non-ASCII characters' option name.
'- ' . sprintf( __( 'To get inside-word highlights, uncheck the "%s" option. That has a side-effect of enabling the inside-word highlights.', 'relevanssi' ), __( 'Uncheck this if you use non-ASCII characters', 'relevanssi' ) ) . '
' .
// Translators: %s is 'relevanssi_throttle_limit'.
'- ' . sprintf( __( 'In order to adjust the throttle limit, you can use the %s filter hook.', 'relevanssi' ), '
pre_option_relevanssi_throttle_limit' ) .
'add_filter( \'pre_option_relevanssi_throttle_limit\', function( $limit ) { return 200; } ); ' .
'- ' . __( "It's not usually necessary to adjust the limit from 500, but in some cases performance gains can be achieved by setting a lower limit. We don't suggest going under 200, as low values will make the results worse.", 'relevanssi' ) . '
' .
'
',
));
$screen->add_help_tab( array(
'id' => 'relevanssi-search-restrictions',
'title' => __( 'Restrictions', 'relevanssi' ),
'content' => '' .
'- ' . __( 'If you want the general search to target all posts, but have a single search form target only certain posts, you can add a hidden input variable to the search form. ', 'relevanssi' ) . '
' .
'- ' . __( 'For example in order to restrict the search to categories 10, 14 and 17, you could add this to the search form:', 'relevanssi' ) .
'
<input type="hidden" name="cats" value="10,14,17" />
' .
'- ' . __( 'To restrict the search to posts tagged with alfa AND beta, you could add this to the search form:', 'relevanssi' ) .
'
<input type="hidden" name="tag" value="alfa+beta" />
' .
// Translators: %s is the link to the Codex page.
'- ' . sprintf( __( 'For all the possible options, see the Codex documentation for %s.', 'relevanssi' ), 'WP_Query' ) . '
' .
'
',
));
$screen->add_help_tab( array(
'id' => 'relevanssi-search-exclusions',
'title' => __( 'Exclusions', 'relevanssi' ),
'content' => '' .
// Translators: %s is the link to the Codex page.
'- ' . sprintf( __( 'For more exclusion options, see the Codex documentation for %s. For example, to exclude tag ID 10, use', 'relevanssi' ), 'WP_Query' ) .
'
<input type="hidden" name="tag__not_in" value="10" />
' .
// Translators: %s is 'relevanssi_do_not_index'.
'- ' . sprintf( __( 'To exclude posts from the index and not just from the search, you can use the %s filter hook. This would not index posts that have a certain taxonomy term:', 'relevanssi' ), '
relevanssi_do_not_index' ) .
'add_filter( \'relevanssi_do_not_index\', \'rlv_index_filter\', 10, 2 );
function rlv_index_filter( $block, $post_id ) {
if ( has_term( \'jazz\', \'genre\', $post_id ) ) {
$block = true;
}
return $block;
}
' .
// Translators: %s is a link to the Relevanssi knowledge base.
'- ' . sprintf( __( "For more examples, see the related knowledge base posts.", 'relevanssi' ), 'https://www.relevanssi.com/tag/relevanssi_do_not_index/' ) . '
' .
'
',
));
$screen->add_help_tab( array(
'id' => 'relevanssi-logging',
'title' => __( 'Logs', 'relevanssi' ),
'content' => '',
));
$screen->add_help_tab( array(
'id' => 'relevanssi-excerpts',
'title' => __( 'Excerpts', 'relevanssi' ),
'content' => '',
));
$screen->add_help_tab( array(
'id' => 'relevanssi-highlights',
'title' => __( 'Highlights', 'relevanssi' ),
'content' => '' .
'- ' . __( "Title highlights don't appear automatically, because that led to problems with highlights appearing in wrong places and messing up navigation menus, for example.", 'relevanssi' ) . '
' .
// Translators: %1$s is 'the_title()', %2$s is 'relevanssi_the_title()'.
'- ' . sprintf( __( 'In order to see title highlights from Relevanssi, replace %1$s in the search results template with %2$s. It does the same thing, but supports Relevanssi title highlights.', 'relevanssi' ), '
the_title()', 'relevanssi_the_title()' ) . ' ' .
'
',
));
$screen->add_help_tab( array(
'id' => 'relevanssi-punctuation',
'title' => __( 'Punctuation', 'relevanssi' ),
'content' => '' .
'- ' . __( 'Relevanssi removes punctuation. Some punctuation is removed, some replaced with spaces. Advanced indexing settings include some of the more common settings people want to change.', 'relevanssi' ) . '
' .
// Translators: %1$s is 'relevanssi_punctuation_filter', %2$s is 'relevanssi_remove_punctuation'.
'- ' . sprintf( __( 'For more fine-tuned changes, you can use %1$s filter hook to adjust what is replaced with what, and %2$s filter hook to completely override the default punctuation control.', 'relevanssi' ), '
relevanssi_punctuation_filter', 'relevanssi_remove_punctuation' ) . ' ' .
// Translators: %s is the URL to the Knowledge Base entry.
'- ' . sprintf( __( "For more examples, see the related knowledge base posts.", 'relevanssi' ), 'https://www.relevanssi.com/tag/relevanssi_remove_punct/' ) . '
' .
'
',
));
$screen->add_help_tab( array(
'id' => 'relevanssi-helpful-shortcodes',
'title' => __( 'Helpful shortcodes', 'relevanssi' ),
'content' => '' .
// Translators: %s is '[noindex]'.
'- ' . sprintf( __( "If you have content that you don't want indexed, you can wrap that content in a %s shortcode.", 'relevanssi' ), '
[noindex]' ) . ' ' .
// Translators: %s is '[searchform]'.
'- ' . sprintf( __( 'If you need a search form on some page on your site, you can use the %s shortcode to print out a basic search form.', 'relevanssi' ), '
[searchform]' ) . ' ' .
// Translators: %1$s is '[searchform post_types="page"]', %2$s is '[searchform cats="10,14,17"]'.
'- ' . sprintf( __( 'If you need to add query variables to the search form, the shortcode takes parameters, which are then printed out as hidden input fields. To get a search form with a post type restriction, you can use %1$s. To restrict the search to categories 10, 14 and 17, you can use %2$s and so on.', 'relevanssi' ), '
[searchform post_types="page"]', '[searchform cats="10,14,17"]' ) . ' ' .
'
',
));
$screen->add_help_tab( array(
'id' => 'relevanssi-title-woocommerce',
'title' => __( 'WooCommerce', 'relevanssi' ),
'content' => '' .
'- ' . __( "If your SKUs include hyphens or other punctuation, do note that Relevanssi replaces most punctuation with spaces. That's going to cause issues with SKU searches.", 'relevanssi' ) . '
' .
// Translators: %s is the Knowledge Base URL.
'- ' . sprintf( __( "For more details how to fix that issue, see WooCommerce tips in Relevanssi user manual.", 'relevanssi' ), 'https://www.relevanssi.com/user-manual/woocommerce/' ) . '
' .
'- ' . __( "If you don't want to index products that are out of stock, excluded from the catalog or excluded from the search, there's a product visibility filtering method that is described in the user manual (see link above).", 'relevanssi' ) . '
' .
'
',
));
$screen->add_help_tab( array(
'id' => 'relevanssi-exact-match',
'title' => __( 'Exact match bonus', 'relevanssi' ),
'content' => '',
));
$screen->set_help_sidebar(
'' . __( 'For more information:', 'relevanssi' ) . '
' .
'' . __( 'Plugin knowledge base', 'relevanssi' ) . '
' .
'' . __( 'WordPress.org forum', 'relevanssi' ) . '
'
);
}