Forums › Forums › Search & Filter Pro › BuddyPress Integration Issues
Tagged: categories, Permalink
- This topic has 13 replies, 2 voices, and was last updated 9 years, 10 months ago by Anonymous.
-
Anonymous(Private) February 2, 2015 at 5:57 am #11250
I have several custom post types on my website that are not working correctly with the search filter and BuddyPress. For example, I have applied the following code to one of my pages:
<?php echo do_shortcode(‘[searchandfilter fields=”encyclopedia-category,post_date” types=”select,daterange” hierarchical=1 hide_empty=1 submit_label=”Filter”]’); ?>
This is intended to filter “Encyclopedia” post types by category (http://dennishoppe.de/en/wordpress-plugins/encyclopedia). The filter works perfectly on my category and single page, but fails on the archive page.
The issue is somehow connected to BuddyPress because when I set the BuddyPress Activity Stream page as my homepage, the filter stops working and redirects me to my home page and displays something similar to the following:
https://sandbox.stratics.com/?encyclopedia-category=uo
However, when I use any other static page as the homepage, the filter starts working again. I suspect this has something to do with the way the search filter uses permalinks and the way BuddyPress treats permalinks, but I am at a loss at this point.
The filter works just fine for my normal articles (substituting ‘category’ for ‘encyclopedia-category’).
I tried to purchase the Pro version to see if it was fixed, but had no luck so I disabled the pro version (it broke all of my previous filters).
Anonymous(Private) February 2, 2015 at 6:59 am #11251Apparently this is an issue where the Activity Stream page uses the same query as the search feature:
https://buddypress.trac.wordpress.org/ticket/5087
They recommend the following:
“As a temporary workaround, you can reconfigure your blog search to go to a blog archive page, rather than the home page URL.”
I’m not sure how to do that with this plugin, any help?
Ross Moderator(Private) February 3, 2015 at 11:24 pm #11401Hey Ryan
I just wrote a long post however I scratched that after noticing something (!)
You are still using the free version of the plugin? Because the pro plugin does not require complex shortcodes to build search forms – normally its a drag and drop UI, and you supply and ID to the shortcdoe 😉
Thanks!
Anonymous(Private) February 4, 2015 at 12:15 am #11409Yes I disabled the pro version as I said. It is still installed and validated on my WordPress, but it did not solve the issue and seemed more complicated than just using the short codes that come with the free version. The drag and drop GUI doesn’t work particularly well with custom post types and I have a lot of those. I use the filter by category feature, and not the search feature. The search feature allows you to select which post types to search, but there isn’t something like that for categories. You can manually select categories to include, but the GUI was mixing categories between various post types, so it was a hassle to figure out because I use several custom filters on my site and a separate filter for each post type. Is there a way to overcome this issue using the pro feature? If so, please let me know. I figured that providing you the pro shortcode would be worthless given that it is just a series of numbers.
In any case, I already had the shortcodes setup and working perfectly using the free version, so I don’t think this is an issue of not configuring the shortcode correctly unless there is an option I’m unaware of. The problem is that when I set my homepage to use a BuddyPress page, the filters stop working for custom post types. According to the BuddyPress ticket I attached previously, this is due to a conflict between the query used for BuddyPress and WordPress searches. Do you know a away around this issue?
Ross Moderator(Private) February 4, 2015 at 12:33 am #11411Hey Ryan
I understand where you are coming from, but you can achieve the same as you would with the shortcode as with the pro and drag and drop – the free version doesn’t even allow for category including and excluding.
Unfortunately I am unable to offer support for the free plugin as the pro uses a much different and modified codebase – with literally hundreds of improvements/features (sorry I missed your note on this in your first post).
You must disable free, and enable pro – and follow the pro setup procedure – you cannot “port over” an old form, it must be recreated from scratch – and looking at the shortcode example I would imagine that would only take 5-10 minutes to recreate:
1) Drag over a taxonomy field for the taxonommy
encyclopedia-category
2) Drag over a post date field, set it to date range
3) Drag over a submit button…Replace your shortcode from the free, from the one provided underneath the “publish” button in S&F admin.
Thanks
Anonymous(Private) February 4, 2015 at 2:10 am #11419I disabled free as advised. Can I delete the free version?
Working on getting the pro version setup, but I’ve run into a couple snags.
1. The display for the filter is stacked vertically instead of horizontally. When I use the free version I am able to get them to display horizontally, which is preferred because I am using the shortcode in page templates at the top of the screen and would like to minimize vertical space.
2. The load results seems to fail. The dropdown menu shows that there are several encyclopedia post types available for each category, but when I run the query I get this blank screen. The free version used to load the results on a category page. I tried to
These are my settings (I tried to disable custom templates and it didn’t work either):
http://snag.gy/Oaj52.jpg
http://snag.gy/zqMBj.jpgI’m using the following code in my template:
<?php echo do_shortcode(‘[searchandfilter id=”1227766″]’); ?>
I’ve also tried changing the template file to my encyclopedia category page archive, but that didn’t work: taxonomy-encyclopedia-category.php.
Ross Moderator(Private) February 4, 2015 at 2:27 am #11424Hey Ryan
1) is an easy css fix, I’ll dig out the code tomorrow
2) this may be a template setting – it is always recommended you specify a template otherwise you may not be able to control the formatting of your search results – I recommend creating a copy of search.php specifically for use in S&F and specifying this in the custom template setting.In this new template file, can you tell me if there are any occurences of
WP_Query
,get_posts
orquery_posts
in that template file?And the
is_true
setting – this setting should only affect the search results page, not your index page – it should automatically be disabled when creating a search form – it is used to fix things in special circumstances.Thanks
Ross Moderator(Private) February 4, 2015 at 2:29 am #11426This plugin should never update your homepage or affect it in any way…. so if you use a non buddypress homepage and the pro plugin, you should also be seeing the same.
-
AuthorPosts