Forum Replies Created
-
AuthorPosts
-
September 14, 2021 at 3:14 pm in reply to: Dynamically filtering bbpress topics and replies based on currently viewed Forum #34741
nickchomey18
Participantdisregard this comment – i figured it out.
-
This reply was modified 4 years, 8 months ago by
nickchomey18.
September 14, 2021 at 2:57 pm in reply to: Dynamically filtering bbpress topics and replies based on currently viewed Forum #34739nickchomey18
ParticipantThanks! You can please close this ticket now.
September 13, 2021 at 3:14 pm in reply to: Dynamically filtering bbpress topics and replies based on currently viewed Forum #34700nickchomey18
ParticipantThanks! Is there anything I can do to allow functions – such as bbp_get_forum_id – to work within the ajax context? I assume that I will need to do other things like this in future snippets.
September 13, 2021 at 2:02 am in reply to: Dynamically filtering bbpress topics and replies based on currently viewed Forum #34675nickchomey18
ParticipantAs it turns out, I was able to get this to work by using the $options[‘current_page_id’] field and the following snippet. You’re welcome to share it with the community – it seems to me that it is very useful for anyone using ASP with bbpress. Do you see anything about it that could be changed/improved?
add_filter('asp_query_args', 'asp_filter_forum', 10, 3); function asp_filter_forum ( $args, $search_id, $options) { if ($search_id == 4) { $forum_id = (int)$options['current_page_id']; $args['post_meta_filter'][] = array( 'key' => '_bbp_forum_id', 'value' => array ($forum_id), 'operator' => '=', 'allow_missing' => false ); } return $args; }Anyway, I am still curious as to whether it is possible to pass a custom variable/parameter/argument to an ASP shortcode? Would it involve editing the ASP source code to add another parameter to the filter, or is there another way?
nickchomey18
ParticipantFYI, this snippet appears to work to create a post author metafield for use with custom field filtering.
function add_post_author_metafield ( $post_id, $post) {
update_post_meta($post_id, ‘post_author_meta’, get_userdata($post->post_author)->user_nicename);
}
add_action( ‘wp_insert_post’, ‘add_post_author_metafield’, 10, 2 );Perhaps you’d like to share it with the community, given that it has been a requested feature?
And, while I have your attention here, I sent a few follow-up questions to you regarding my pre-sale inquiry email. I’m sure you’re busy, but I would appreciate if you could take a look and respond. On that note, are tickets the best way to reach you?
nickchomey18
ParticipantThanks! I was able to create a function and hook to generate a metafield for one post type, but am struggling with all post types. It worked though, and I’ll keep working to figure it out. You can close this ticket now.
September 3, 2021 at 3:33 pm in reply to: Bug when using ASP with BuddyBoss Group-associated Forums #34527nickchomey18
ParticipantMy previous snippet to add reply titles was using an action hook after the reply was created to run wp_update_post, so it was not interfering with ASP. But I just found a somewhat hidden filter that runs immediately prior to wp_insert_post and was able to modify it to create a post_title, which is far better as it also doesn’t create a revision post. The problem with ASP has now gone away – so this killed two birds with one stone! Thanks very much for the prompt to look into this some more!
I suppose you can close the ticket now.
September 3, 2021 at 1:33 pm in reply to: Bug when using ASP with BuddyBoss Group-associated Forums #34526nickchomey18
ParticipantThanks, that’s fantastic! Is there some code that I can add to a snippet to fix this on my site prior to your next release?
Also, I had recently noticed that the reply titles are empty and submitted a support ticket to BuddyBoss about it. It seems to me that there should definitely be a title – both for compatibility with plugins that would be expecting one, as well as for the fact that when you move a reply to a different topic, it actually creates a title! It is clearly an oversight by them.
I also messed around with a snippet to add a title to replies – I forget if I kept it or not, but I will investigate to see if that is causing a conflict with ASP.
-
This reply was modified 4 years, 8 months ago by
-
AuthorPosts