Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling Buddy Press breaks Facetious Search #23

Open
digitalchild opened this issue Jul 1, 2014 · 4 comments
Open

Enabling Buddy Press breaks Facetious Search #23

digitalchild opened this issue Jul 1, 2014 · 4 comments

Comments

@digitalchild
Copy link

Hello,

After enabling buddy press on one of my sites the facetious search stops working.

WP 3.9.1
BuddyPRess 2.0.1
Facetious Search 1.1.4

Using the widgets or short codes and hit search, I see the URL changes to the facetious parameters for a second then its redirected back to the home page.

I also posted this to the WP support forum for the plugin.

@digitalchild
Copy link
Author

On top of this, disabling Facetious search with buddy press enabled and search starts working again.

@digitalchild
Copy link
Author

After some digging I've found it is because buddy press overrides the search slug so the code in facetious to make nice URLs gets overridden by BuddyPress.

If you override the buddypress search slug with the following at the top of your functions.php facetious starts working again.


Line 273 of facetious.php is where it breaks. 
$this->search_base = apply_filters( 'facetious_search_base', $wp_rewrite->search_base ); 

I hope this helps. 

@digitalchild
Copy link
Author

It appears that apply filter is not firing at the right time.

Putting the following into your wp-config file works.

define( 'BP_SEARCH_SLUG', 'someotherslug' );

@simonwheatley
Copy link
Member

Nice writeup by @digitalchild with more detail: https://digitalchild.info/buddypress-wordpress-search/

@digitalchild We're not working with BuddyPress right now, so it's unlikely we'll look into this issue soon, but thank you for chasing down the issue, and posting your thoughts and a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants