List of available Hooks (Actions & Filters)
Quote from Asgaros on October 25, 2019, 6:46 pmHello @alcandau
I suggest you to use theĀ asgarosforum_after_post_author action to show additional information below the username and its first argument is the ID of the post-author. I am not exactly sure how the ACF filters are working, but I guess you can use the filter above to build something.
Hello @alcandau
I suggest you to use theĀ asgarosforum_after_post_author action to show additional information below the username and its first argument is the ID of the post-author. I am not exactly sure how the ACF filters are working, but I guess you can use the filter above to build something.
Quote from Alcandau on October 29, 2019, 1:42 pmHello,
Thank you !
Could please lead me just for the beginning with ‘asgarosforum_after_post_author‘ ?
If I want to use it like here with ‘asgarosforum_filter_post_username’ :
$username = apply_filters(‘asgarosforum_filter_post_username’, $this->getUsername($post->author_id), $post->author_id);
echo ‘<span class=”post-username”>’.$username.'</span>’;What to if I want to display, for example the “age” (simple ACF profile field = ‘age’) just under the username in the presentation box displayed on every posts/messages ?
It will help me for the other fields.
Thanks a lot,
Regards,
Al
Hello,
Thank you !
Could please lead me just for the beginning with ‘asgarosforum_after_post_author‘ ?
If I want to use it like here with ‘asgarosforum_filter_post_username’ :
$username = apply_filters(‘asgarosforum_filter_post_username’, $this->getUsername($post->author_id), $post->author_id);
echo ‘<span class=”post-username”>’.$username.'</span>’;
What to if I want to display, for example the “age” (simple ACF profile field = ‘age’) just under the username in the presentation box displayed on every posts/messages ?
It will help me for the other fields.
Thanks a lot,
Regards,
Al
Quote from Asgaros on October 31, 2019, 5:18 pmHello @alcandau
For this purpose you can use the get_field function of ACF:
https://www.advancedcustomfields.com/resources/get_field/
An action can be used like the following:
function your_function() { // your code } add_action('asgarosforum_after_post_author', 'your_function');
Hello @alcandau
For this purpose you can use the get_field function of ACF:
https://www.advancedcustomfields.com/resources/get_field/
An action can be used like the following:
function your_function() { // your code } add_action('asgarosforum_after_post_author', 'your_function');
Quote from kapitayan on November 3, 2019, 11:42 amI tried to make a new function, and paste it in the Asgaros forum … in that function,
I want to take the author id variable from each new topic,
I tried entering the $author_id variable, but it displays something that is not appropriate is there an example to get the variable I want?
Thank you very much
I tried to make a new function, and paste it in the Asgaros forum … in that function,
I want to take the author id variable from each new topic,
I tried entering the $author_id variable, but it displays something that is not appropriate is there an example to get the variable I want?
Thank you very much
Quote from wapsolutions on March 27, 2020, 5:12 pm++ EDIT: Moved to support section, I will update this post with an working example once I solved this issue ++
Hi there,
I am looking for a hook, that fires after a topic was generated by saving a post and allows me to get the ID or a permalink to that topic.
Background:
For a team, I created a custom post type “Tasks” to create tasks with some additional ACF fields. In case a specific task needs further discussion, I added the Asgaros topic_metabox to that post type. Since the forum is used anyway by the team, I do not want to mix WP comments and forum conversations in the same environment, all discussion is handled inside the forum.
I already filter the topic content, to add a link to the specific task (custom post type) in the new forum topic. So whenever a topic is created by creating a task, this topic will contain a link to the specific task.
Additionally I want to add a link back to that forum topic to the specific task. So, what I need, is the ID or something unique right after the topic was created and add that information to the corresponding post.
Since I could not find a documentation of what each hook is really doing, I am posting this question here. I played around with asgarosforum_after_add_topic_submit and asgarosforum_after_post_message already, but could not find a solution.
Any ideas?
++ EDIT: Moved to support section, I will update this post with an working example once I solved this issue ++
Hi there,
I am looking for a hook, that fires after a topic was generated by saving a post and allows me to get the ID or a permalink to that topic.
Background:
For a team, I created a custom post type “Tasks” to create tasks with some additional ACF fields. In case a specific task needs further discussion, I added the Asgaros topic_metabox to that post type. Since the forum is used anyway by the team, I do not want to mix WP comments and forum conversations in the same environment, all discussion is handled inside the forum.
I already filter the topic content, to add a link to the specific task (custom post type) in the new forum topic. So whenever a topic is created by creating a task, this topic will contain a link to the specific task.
Additionally I want to add a link back to that forum topic to the specific task. So, what I need, is the ID or something unique right after the topic was created and add that information to the corresponding post.
Since I could not find a documentation of what each hook is really doing, I am posting this question here. I played around with asgarosforum_after_add_topic_submit and asgarosforum_after_post_message already, but could not find a solution.
Any ideas?