If enough people request it then I’ll consider adding it as an option.
Instead of editing the core files directly, you should use the bgmp_post-type-params
filter. That way you can upgrade the plugin without having your customizations overwritten.
I’d be grateful for adding the exclusion placemarks from search results, too
I agree, they should be excluded from search.
You can use the bgmp_post-type-params filter to remove them from the search. The problem with making them excluded by default at this point is that other users are already relying on having them enabled by default, so it would create problems for them if it suddenly switched.
Please make it an option. Not keen on editing files, and then the next upgrade wipes out the changes…
Currently if I click on a placemark in the search results wordpress says not found. So from a user perspective, how does having placemarks in the search results help the user exactly?
Murray, you don’t need to edit the core files. You can create a callback function for the bgmp_post-type-params
filter in a functionality plugin, or your theme, and it won’t be overwritten when you upgrade the plugin.
Something like this should do it:
function excludePlacemarksFromSearch( $params )
{
$params[ 'exclude_from_search' ] = true;
return $params;
}
add_filter( 'bgmp_post-type-params', 'excludePlacemarksFromSearch' );
Hello,
Newbie here… If someone could tell me exactly where to put those few lines of code above, I would be so thankful!
How is “a callback function” created? Where is the bgmp_post-type-params filter?
I agree with Murray: no use for placemarks to be seen in search results, since if clicked there is no page associated with them.
Thank you!
(just to say that taggie’s method works, but I’ll avoid updates)