Custom Post Type – Forums, Topics, Replies
-
Thanks for revamping this plugin. In my BuddyPress trial setup under custom post types I see that forums are listed however selecting these options do not cause the widget to be displayed o the forums pages. Is that supposed to work?
-
Not sure if this makes a difference but I was viewing a group forum
I’ve not used the BuddyPress plugin before, so unfamiliar with BuddyPress coding.
After some localhost (test setup) testing, it looks like the default Groups forum is a standard Static Page (loaded under
example.com/groups/). It can be edited under Dashboard “Pages” menu link (so it’s a Static Page the BuddyPress plugin automatically creates). The Groups Static Page has no content (when edited under Pages), so it’s some sort of holder page for the BuddyPress plugin to add the content using custom features: they have their own BuddyPress database table (wp_bp_groups) for the Groups content.When editing a Widget the Groups Static Page is available under “Static Pages +/-” and works as expected for the main Groups page. So looks like the main Group pages can have widgets shown/hidden on them.
After creating a few test Group posts (loaded under
example.com/groups/test-post-name/) those forum posts are not available under the Widgets Display Options and the Posts aren’t available to edit under the Pages and Posts menus. Looks like there’s a Custom Post Type Archive called Groups which hold the Groups Posts, but think they are set to not public.The Display Widgets SEO Plus Plugin is set to only show Custom Posts which have a Custom Post Type Archive AND are set to Public. The BuddyPress Plugin also has custom posts for the email notifications, these are also not public (for obvious reasons).
In my tests the BuddyPress Custom Posts aren’t listed in the “Custom Post Types +/-” form (because BuddyPress sets them to not public). You might be seeing them because you just installed the Display Widgets SEO Plus Plugin and you are seeing cached (transient) data: the cache is cleared when a Post is saved or when the transient data expires, so those custom posts might disappear within a week. I had the same cache issue with categories (had to disable the cache), I’ll see if there’s a fix for this in the next update.
Although the Custom Posts are available to select (because they are cached), there’s other parts of the plugin which says don’t use them because they aren’t set to public, so ticking them won’t do anything.
I’m updating another plugin https://ww.wp.xz.cn/plugins/stallion-wordpress-seo-plugin/, was just about to release version 3.0.0, but noted an issue with the output when using BuddyPress. The canonical URLs the SEO plugin outputs are broken on the BuddyPress Plugin output. Will be looking into why the Stallion SEO Plugin v3.0.0 is having issues, fix it, then look into getting the Display Widgets SEO Plus Plugin working with BuddyPress.
Thanks for mentioning it was on a Group Forum, helped a lot tracking down the most likely cause quickly.
David
Thanks for the response, it would be so good to add BuddyPress support in here.
Figured out how to add support for various BuddyPress sections, adding them under the “Content Types +/-” section now.
Just have to decide which ones to include.
BuddyPress has a LOT of built in conditional functions with the format
bp_is_#####(), there’s dozens of them.These are the ones added so far.
ALL BuddyPress Pages –
!bp_is_blog_page()
BuddyPress Members Directory –bp_is_members_directory()
BuddyPress User Pages –bp_is_user()
BuddyPress Activity Streams Directory –bp_is_activity_directory()
BuddyPress Activity Streams Item –bp_is_single_activity()
BuddyPress Groups Directory –bp_is_groups_directory()
BuddyPress Group –bp_is_group()I’m not a BuddyPress user so if you think I’ve missed something important, let me know.
I noticed something about legacy forums which I think is related to
bp_is_group_forum(). Just started looking into it, do BuddyPress users also install BBPress for forums?Have to say BuddyPress have done a really good job with the conditional support, so many options and named well.
Could have gone into really specific conditions. For example
bp_is_user_profile()is the Profile page for each user: for the Admin user it’s under the URLexample.com/members/admin/profile/. Adding thebp_is_user_profile()conditional would show/hide widgets on just the Profile pages.Where the Profile link is there’s also these sections:
Activity
Notifications
Messages
Friends
Groups
SettingsAnd these break up further, for example Activity has
Personal
Mentions
Favourites
Friends
GroupsIf each one has it’s own
bp_is_#####()conditional function (I assume they do), they could each have different widgets. However that’s a LOT of options and probably not that useful to have that level of widget support, so all the above are covered underbp_is_user().David
Thanks Dave this sounds really promising.
Yes I think there is a danger here or creating too much complexity.
I think it the first instance I would like to display different widgets on the following pages:
Group directory page
Activity Page
Members directory page
The same widget on all Profile Pages (so regardless of which profile page is selected – profile, activity, notifications etc. there should be one setting that selects all of them.
All Group Pages – so this setting would display the widget on all individual group pages.Future options
Individual group – the ability to display a widget on a specific groups pages, I’e allow we to at a sidebar image that only displays in the Ferrari Appreciation Group for example.Splitting down the Profile pages into a setting for each individual page type – I’m not sure this is required, I could see it could be useful for some – i.e. ability to add help text in a widget that only displays on the Profile Message Compose page could be an option but I’m concerned about the overall level of complexity that this would create and if there would actually be that much demand for this.
Hope that helps
The above is coded and working other than the Future Options which would be the next level (harder to code the logic, so future update if it’s possible).
Going through the bbPress plugin conditional logic to work alongside the BuddyPress conditional logic.
Shouldn’t take too long to finish.
David
There is one page that needs something, the Forums directory page, sorry I forgot to mention that one.
I think there’s also a decision to be made about how you handle forums when they are in groups. You could actually make this a plugin option in some way – when viewing a group forum, do you show the forums widgets or the groups widgets? I can see for some sites you would want the group forum to inherit the group widgets and it other cases the forum widgets
Just pushed out the v1.1.0 update which includes BuddyPress/bbPress widget logic support and a few bug fixes. Took longer than expected to update, found a bug in the plugin (related to transients) and was stumped for a while on the cause/fix!
BTW found your site via http://buddyuser.com/plugin-review-display-widgets-seo-plus tried to comment (just to post it’s updated) and not sure it went through: listed as a SPAM comment.
David
Thanks, seems to work like a dream! I’m going to update my review soon as I’m able. I’ve also got an article about sidebars and I’m going to update that with mention of this plugin.
Glad it’s working, the BuddyPress/bbPress developers have made life easy for developers by including a LOT of conditional functions similar to the core ones.
Think I’ve covered everything important, there’s plenty more BuddyPress/bbPress specific conditional options which could be added, so if I’ve missed one should be easy to add in a future update.
David
Yep I’ll be doing more testing next week and will give you any feedback.
The topic ‘Custom Post Type – Forums, Topics, Replies’ is closed to new replies.