Title: Group Page Tab
Last modified: March 21, 2024

---

# Group Page Tab

 *  Resolved [rosbiffer](https://wordpress.org/support/users/rosbiffer/)
 * (@rosbiffer)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/group-page-tab/)
 * On your website you talk about a hook to allow the addition of tabs to the group
   page, like you can to user profile pages ([https://profilegrid.co/developer-documentation/actions/profile_magic_group_photos_tab/](https://profilegrid.co/developer-documentation/actions/profile_magic_group_photos_tab/)).
   Is there any chance you could release this as an extension? I’m not sure how 
   to implement it otherwise.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [ProfileGrid Support](https://wordpress.org/support/users/profilegrid0/)
 * (@profilegrid0)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/group-page-tab/#post-17520611)
 * Hello [@rosbiffer](https://wordpress.org/support/users/rosbiffer/),
 * Thank you for bringing this requirement to our attention. We have duly noted 
   it and forwarded it to our team for possible inclusion in future updates.
 *  [lurg](https://wordpress.org/support/users/lurg/)
 * (@lurg)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/group-page-tab/#post-17742243)
 * I tried to add a new Tab with the action hooks. But the content I load in it 
   is now on all tabs, not only the new one. What is wrong?
 *     ```wp-block-code
       // Funktion zur Anzeige des Tabs "Nächste Phase buchen"
       function profile_magic_display_next_phase_tab($user_id, $gid) {
           // HTML-Code für den neuen Tab
           echo '<li class="pm-profile-tab pm-pad10"><a href="#profile_magic_next_phase" id="profile_magic_next_phase_tab">Nächste Phase buchen</a></li>';
       }
   
       // Hinzufügen des Tabs
       add_action('profile_magic_group_photos_tab', 'profile_magic_display_next_phase_tab', 10, 2);
   
   
       // Funktion zur Anzeige des Inhalts unter dem Tabs "Nächste Phase buchen"
       function profile_magic_display_next_phase_content($user_id, $gid) {
           // Starte WordPress-Abfrage
           $args = array(
               'post_type' => 'post',
               'posts_per_page' => -1, // Zeigt alle Beiträge an
               'category_name' => 'produkt', // Kategorie "Produkt"
           );
           $query = new WP_Query($args);
   
           // Überprüfen, ob Beiträge gefunden wurden
           if ($query->have_posts()) {
               echo '<div class="product-posts">'; // Container für Beiträge
               while ($query->have_posts()) {
                   $query->the_post();
                   // Anzeige des Beitragstitels und Inhalts
                   echo '<h2>' . get_the_title() . '</h2>';
                   echo '<div class="entry-content">';
                   the_content();
                   echo '</div>';
               }
               echo '</div>';
               // Zurücksetzen der Abfragevariablen
               wp_reset_postdata();
           } else {
               echo 'Keine Beiträge gefunden.';
           }
       }
   
       // Hinzufügen des Inhalts unter dem neuen Tab
       add_action('profile_magic_group_photos_tab_content', 'profile_magic_display_next_phase_content', 10, 2);
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Group Page Tab’ is closed to new replies.

 * ![](https://ps.w.org/profilegrid-user-profiles-groups-and-communities/assets/
   icon.svg?rev=2547387)
 * [ProfileGrid – User Profiles, Groups and Communities](https://wordpress.org/plugins/profilegrid-user-profiles-groups-and-communities/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/profilegrid-user-profiles-groups-and-communities/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/)
 * [Active Topics](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/profilegrid-user-profiles-groups-and-communities/reviews/)

## Tags

 * [group](https://wordpress.org/support/topic-tag/group/)
 * [tab](https://wordpress.org/support/topic-tag/tab/)
 * [wall](https://wordpress.org/support/topic-tag/wall/)

 * 2 replies
 * 3 participants
 * Last reply from: [lurg](https://wordpress.org/support/users/lurg/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/group-page-tab/#post-17742243)
 * Status: resolved