Append "Favorites" into list
This topic contains 26 replies, has 2 voices, and was last updated by Michele 7 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 15, 2017 at 5:57 pm #367528
I have created a new tab called “Attendees” within my Geodirectory events. I am currently using “WTI Like Post Pro” which is a simple “Like” button, to allow users to add themselves as “Going” to an event. Although this appears to work, I’d much rather utilize the Geodirectory “Favorite” button since this ties to the users buddypress profile.
How would I modify the “Favorite” button so it will retrieve the users “Nice_name” and Avatar and append them in a list under the event’s tab? Even if you could just point me to where the “Favorite” button code lives that would be a big help.
Thank you! You guys have been really great!
MicheleHere is my current code:
add_filter(‘geodir_detail_page_tab_list_extend’, ‘geodir_detail_page_tab_list_extend’);function geodir_detail_page_tab_list_extend($tab_array) {
if ( ‘gd_event’ == get_post_type() )
$tab_array[‘my_new_tab’] = array(
‘heading_text’ => __(‘Attendees’,GEODIRECTORY_TEXTDOMAIN),
‘is_active_tab’ => false,
‘is_display’ => apply_filters(‘geodir_detail_page_tab_is_display’, true,’my_new_tab’),
‘tab_content’ => ”);
return $tab_array ; }add_action(‘geodir_after_tab_content’ ,’geodir_my_new_tab_content’);
function geodir_my_new_tab_content($tab_index)
{
if($tab_index ==’my_new_tab’)
{GetWtiLikePost();}
}March 16, 2017 at 9:51 am #367650I think you are looking for a RSVP feature.
See “Are You Interested?” widget here.
https://wpgeodirectory.com/docs/whoop-theme-available-widgets/#ayi-widget
If yes, then we moved it to a new addon. So it supports all themes now.
Let me know if thats what you are looking for.
Thanks
March 16, 2017 at 3:24 pm #367767Yes that is exactly what I am looking for!!!! How do I go about getting the new addon???
Michele
March 16, 2017 at 3:28 pm #367769This reply has been marked as private.March 16, 2017 at 3:43 pm #367773Works beautifully! Thank you so much! This is a God Send!
Michele
March 16, 2017 at 3:54 pm #367774You are welcome 🙂
March 16, 2017 at 4:18 pm #367785Quick Question…
If I wanted to still add the list of “I’m in” attendees to my attendees tab on the details page, what piece of code would I extract from the widget to have the list appear in the tab area as well.I tried this code but nothing happened…
add_filter(‘geodir_detail_page_tab_list_extend’, ‘geodir_detail_page_tab_list_extend’);function geodir_detail_page_tab_list_extend($tab_array) {
if ( ‘gd_event’ == get_post_type() )
$tab_array[‘my_new_tab’] = array(
‘heading_text’ => __(‘Attendees’,GEODIRECTORY_TEXTDOMAIN),
‘is_active_tab’ => false,
‘is_display’ => apply_filters(‘geodir_detail_page_tab_is_display’, true,’my_new_tab’),
‘tab_content’ => ”);
return $tab_array ; }add_action(‘geodir_after_tab_content’ ,’geodir_my_new_tab_content’);
function geodir_my_new_tab_content($tab_index)
{
if($tab_index ==’my_new_tab’)
{geodir_ayi_rsvp_users_for_a_post($post->ID, “event_rsvp_yes”, $no_of_users, $gde);}March 16, 2017 at 4:19 pm #367788Use the shortcode
[ayi]
March 16, 2017 at 4:23 pm #367789In your case it should be
if ($tab_index ==’my_new_tab’) { echo do_shortcode('[ayi]'); }
March 16, 2017 at 4:30 pm #367792hmmm…nope crashed the site…
March 16, 2017 at 4:36 pm #367794Nevermind..Got it! THANK YOU!!! 🙂
March 16, 2017 at 4:36 pm #367795Thats because the quote converted I guess in my last snippet. Use correct quotes for my_new_tab
March 16, 2017 at 4:36 pm #367796You are welcome.
March 16, 2017 at 5:06 pm #367805Just one more thing for you guys to note perhaps for the development of the addon..
I noticed that “Events” tab in the users’ buddypress profile is not syncing to the RSVP the user made when they click “I’m in”.
In other words, when you go to a user’s profile, click events, the attending tab just says “Sorry, No events just yet.” Even though they rsvp for an event.
See Image Attached…
March 16, 2017 at 5:07 pm #367808It must be a bug. I’ll fix that tomorrow.
Thanks for reporting
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket