bp_get_directory_title( string $component = '' )

Get the directory title for a component.

Description

Used for the element and the page header on the component directory page.</p> </section> <section class="parameters"> <h3 id="ref-params" class="ref-context">Parameters<span id="ref-params-link" class="ref-context-link"></span></h3> <dl> <dt>$component</dt> <dd> <p class="desc"> <span class="type">(<span class="string">string</span>)</span> <span class="required">(Optional)</span> <span class="description">Component to get directory title for.</span> </p> <p class="default">Default value: ''</p> </dd> </dl> </section> <section class="return"> <h3 id="ref-return" class="ref-context">Return<span id="ref-return-link" class="ref-context-link"></span></h3> <p><span class='return-type'>(string)</span> </p> </section> <section class="source-content"> <h3 id="ref-source" class="ref-context">Source<span id="ref-source-link" class="ref-context-link"></span></h3> <p> File: <a href="https://www.buddyboss.com/resources/reference/files/bp-core/bp-core-template.php/">bp-core/bp-core-template.php</a> </p> <div class="source-code-container"> <pre class="brush: php; toolbar: false; first-line: 136">function bp_get_directory_title( $component = '' ) { $title = ''; // Use the string provided by the component. if ( ! empty( buddypress()->{$component}->directory_title ) ) { $title = buddypress()->{$component}->directory_title; // If none is found, concatenate. } elseif ( isset( buddypress()->{$component}->name ) ) { $title = sprintf( __( '%s Directory', 'buddyboss' ), buddypress()->{$component}->name ); } /** * Filters the directory title for a component. * * @since BuddyPress 2.0.0 * * @param string $title Text to be used in <title> tag. * @param string $component Current componet being displayed. */ return apply_filters( 'bp_get_directory_title', $title, $component ); } </pre> </div> <p class="source-code-links"> <span> <a href="#" class="show-complete-source">Expand full source code</a> <a href="#" class="less-complete-source">Collapse full source code</a> </span> </p> </section> <section class="changelog"> <h3 id="ref-changelog" class="ref-context">Changelog<span id="ref-changelog-link" class="ref-context-link"></span></h3> <table> <caption class="screen-reader-text">Changelog</caption> <thead> <tr> <th class="changelog-version">Version</th> <th class="changelog-desc">Description</th> </tr> </thead> <tbody> <tr> <td><a href="https://www.buddyboss.com/resources/reference/since/buddypress.2.0.0/" alt="WordPress BuddyPress 2.0.0">BuddyPress 2.0.0</a></td> <td>Introduced.</td> </tr> </tbody> </table> </section> <section class="related"> <h2 id="ref-related" class="ref-context">Related<span id="ref-related-link" class="ref-context-link"></span></h2> <article class="uses"> <h3>Uses</h3> <table id="uses-table"> <caption class="screen-reader-text">Uses</caption> <thead> <tr> <th>Uses</th> <th class="related-desc">Description</th> </tr> </thead> <tbody> <tr> <td> <span>bp-loader.php:</span> <a href="https://www.buddyboss.com/resources/reference/functions/buddypress/">buddypress()</a> </td> <td class="related-desc"> <p>The main function responsible for returning the one true BuddyBoss Instance to functions everywhere.</p> </td> </tr> <tr> <td> <span>bp-core/bp-core-template.php:</span> <a href="https://www.buddyboss.com/resources/reference/hooks/bp_get_directory_title/">bp_get_directory_title</a> </td> <td class="related-desc"> <p>Filters the directory title for a component.</p> </td> </tr> <tbody> </table> </article> <article class="used-by"> <table id="used-by-table"> <caption class="screen-reader-text">Used By</caption> <thead> <tr> <th>Used By</th> <th class="related-desc">Description</th> </tr> </thead> <tbody> <tr> <td> <span>bp-document/classes/class-bp-document-theme-compat.php:</span> <a href="https://www.buddyboss.com/resources/reference/classes/bp_document_theme_compat/directory_dummy_post/">BP_Document_Theme_Compat::directory_dummy_post()</a> </td> <td class="related-desc"> <p>Update the global $post with directory data.</p> </td> </tr> <tr> <td> <span>bp-media/classes/class-bp-media-theme-compat.php:</span> <a href="https://www.buddyboss.com/resources/reference/classes/bp_media_theme_compat/directory_dummy_post/">BP_Media_Theme_Compat::directory_dummy_post()</a> </td> <td class="related-desc"> <p>Update the global $post with directory data.</p> </td> </tr> <tr> <td> <span>bp-groups/classes/class-bp-groups-theme-compat.php:</span> <a href="https://www.buddyboss.com/resources/reference/classes/bp_groups_theme_compat/directory_dummy_post/">BP_Groups_Theme_Compat::directory_dummy_post()</a> </td> <td class="related-desc"> <p>Update the global $post with directory data.</p> </td> </tr> <tr> <td> <span>bp-members/classes/class-bp-members-theme-compat.php:</span> <a href="https://www.buddyboss.com/resources/reference/classes/bp_members_theme_compat/directory_dummy_post/">BP_Members_Theme_Compat::directory_dummy_post()</a> </td> <td class="related-desc"> <p>Update the global $post with directory data.</p> </td> </tr> <tr> <td> <span>bp-core/bp-core-template.php:</span> <a href="https://www.buddyboss.com/resources/reference/functions/bp_get_title_parts/">bp_get_title_parts()</a> </td> <td class="related-desc"> <p>Get the title parts of the BuddyPress displayed page</p> </td> </tr> <tr> <td> <span>bp-activity/classes/class-bp-activity-theme-compat.php:</span> <a href="https://www.buddyboss.com/resources/reference/classes/bp_activity_theme_compat/directory_dummy_post/">BP_Activity_Theme_Compat::directory_dummy_post()</a> </td> <td class="related-desc"> <p>Update the global $post with directory data.</p> </td> </tr> <tbody> </table> <a href="#" class="show-more">Show 1 more used by</a> <a href="#" class="hide-more">Hide more used by</a> </article> </section> <section class="ref-feedback-wrap"> <h3>Questions?</h3> <p>We're always happy to help with code or other questions you might have! Search our <a href="https://www.buddyboss.com/resources/reference/">developer docs</a>, <a href="https://www.buddyboss.com/my-account/?tab=helpscouttickets">contact support</a>, or connect with our <a href="https://www.buddyboss.com/buddypress-developers/">sales team</a>. </p> </section> </div> </div> </div> </div> </article> </main><!-- #main --> </div><!-- #primary --> </div><!-- #primary --> </div><!-- .bb-grid --> </div><!-- .container --> </div><!-- #content --> <footer class="footer-bottom bb-footer style-1"> <div class="container flex"> <div class="footer-bottom-left"> <div class="copyright">© 2021 • BuddyBoss</div></div><div class="footer-bottom-right push-right"></div> </div> </footer> </div><!-- #page --> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-docs/assets/js/anchor.min.js?ver=1.4.8' id='bbdocs-anchorjs-js'></script> <script type='text/javascript' id='bbdocs-scripts-js-extra'> /* <![CDATA[ */ var bbDocs_Vars = {"ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","nonce":"6ec30127b0","style":"https:\/\/www.buddyboss.com\/resources\/wp-content\/plugins\/buddyboss-docs\/assets\/css\/print.css","powered":"\u00a9 BuddyBoss Resources, 2021. Powered by bbDocs<br>https:\/\/www.buddyboss.com\/resources"}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-docs/assets/js/frontend.min.js?ver=1.4.8' id='bbdocs-scripts-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/underscore.min.js?ver=1.8.3' id='underscore-js'></script> <script type='text/javascript' id='wp-util-js-extra'> /* <![CDATA[ */ var _wpUtilSettings = {"ajax":{"url":"\/resources\/wp-admin\/admin-ajax.php"}}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/wp-util.min.js?ver=5.7.2' id='wp-util-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.4.4' id='wp-polyfill-js'></script> <script type='text/javascript' id='wp-polyfill-js-after'> ( 'fetch' in window ) || document.write( '<script src="https://www.buddyboss.com/resources/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src="https://www.buddyboss.com/resources/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.DOMRect ) || document.write( '<script src="https://www.buddyboss.com/resources/wp-includes/js/dist/vendor/wp-polyfill-dom-rect.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.URL && window.URL.prototype && window.URLSearchParams ) || document.write( '<script src="https://www.buddyboss.com/resources/wp-includes/js/dist/vendor/wp-polyfill-url.min.js?ver=3.6.4"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src="https://www.buddyboss.com/resources/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src="https://www.buddyboss.com/resources/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js?ver=2.0.2"></scr' + 'ipt>' );( 'objectFit' in document.documentElement.style ) || document.write( '<script src="https://www.buddyboss.com/resources/wp-includes/js/dist/vendor/wp-polyfill-object-fit.min.js?ver=2.3.4"></scr' + 'ipt>' ); </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/dist/hooks.min.js?ver=50e23bed88bcb9e6e14023e9961698c1' id='wp-hooks-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/dist/i18n.min.js?ver=db9a9a37da262883343e941c3731bc67' id='wp-i18n-js'></script> <script type='text/javascript' id='wp-i18n-js-after'> wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } ); </script> <script type='text/javascript' id='bp-nouveau-js-extra'> /* <![CDATA[ */ var BP_Nouveau = {"ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","only_admin_notice":"As you are the only organizer of this group, you cannot leave it. You can either delete the group or promote another member to be an organizer first and then leave the group.","is_friend_confirm":"Are you sure you want to remove your connection with this member?","confirm":"Are you sure?","confirm_delete_set":"Are you sure you want to delete this set? This cannot be undone.","show_x_comments":"View previous comments","unsaved_changes":"Your profile has unsaved changes. If you leave the page, the changes will be lost.","object_nav_parent":"#buddypress","empty_field":"New Field","objects":{"1":"members","4":"xprofile","11":"search"},"nonces":{"members":"428ec150bf","xprofile":"528095e401","search":"be5d51f41d"}}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-platform/bp-templates/bp-nouveau/js/buddypress-nouveau.min.js?ver=1.5.9' id='bp-nouveau-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-platform/bp-templates/bp-nouveau/js/jquery.guillotine.min.js?ver=1.5.9' id='guillotine-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/comment-reply.min.js?ver=5.7.2' id='comment-reply-js'></script> <script type='text/javascript' id='heartbeat-js-extra'> /* <![CDATA[ */ var heartbeatSettings = {"ajaxurl":"\/resources\/wp-admin\/admin-ajax.php"}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/heartbeat.min.js?ver=5.7.2' id='heartbeat-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/jquery/ui/core.min.js?ver=1.12.1' id='jquery-ui-core-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/jquery/ui/menu.min.js?ver=1.12.1' id='jquery-ui-menu-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/dist/dom-ready.min.js?ver=eb19f7980f0268577acb5c2da5457de3' id='wp-dom-ready-js'></script> <script type='text/javascript' id='wp-a11y-js-translations'> ( function( domain, translations ) { var localeData = translations.locale_data[ domain ] || translations.locale_data.messages; localeData[""].domain = domain; wp.i18n.setLocaleData( localeData, domain ); } )( "default", { "locale_data": { "messages": { "": {} } } } ); </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/dist/a11y.min.js?ver=5e00de7a43b31bbb9eaf685f089a3903' id='wp-a11y-js'></script> <script type='text/javascript' id='jquery-ui-autocomplete-js-extra'> /* <![CDATA[ */ var uiAutocompleteL10n = {"noResults":"No results found.","oneResult":"1 result found. Use up and down arrow keys to navigate.","manyResults":"%d results found. Use up and down arrow keys to navigate.","itemSelected":"Item selected."}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/jquery/ui/autocomplete.min.js?ver=1.12.1' id='jquery-ui-autocomplete-js'></script> <script type='text/javascript' id='bp-nouveau-search-js-extra'> /* <![CDATA[ */ var BP_SEARCH = {"nonce":"d2d4a5c605","action":"bp_search_ajax","debug":"1","ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","loading_msg":"Loading Suggestions","enable_ajax_search":"1","per_page":"5","autocomplete_selector":".header-search-wrap .search-form","form_selector":".widget_search .search-form","forums_autocomplete":""}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-platform/bp-templates/bp-nouveau/js/buddypress-search.min.js?ver=1.5.9' id='bp-nouveau-search-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/imagesloaded.min.js?ver=4.1.4' id='imagesloaded-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/masonry.min.js?ver=4.2.2' id='masonry-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/menu.js?ver=1.6.6' id='boss-menu-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/fitvids.js?ver=1.6.6' id='boss-fitvids-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/slick.min.js?ver=1.6.6' id='boss-slick-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/panelslider.min.js?ver=1.6.6' id='boss-panelslider-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/sticky-kit.js?ver=1.6.6' id='boss-sticky-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/jssocials.min.js?ver=1.6.6' id='boss-jssocials-js-js'></script> <script type='text/javascript' id='buddyboss-theme-main-js-js-extra'> /* <![CDATA[ */ var bs_data = {"jm_ajax":"https:\/\/www.buddyboss.com\/resources\/jm-ajax\/","ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","show_notifications":"1","show_messages":"1","facebook_label":"Share on Facebook","twitter_label":"Tweet","translation":{"comment_posted":"Your comment has been posted.","comment_btn_loading":"Please Wait..."}}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/main.js?ver=1.6.6' id='buddyboss-theme-main-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/validate.min.js?ver=1.6.6' id='boss-validate-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/plugins/buddyboss-platform/bp-core/js/vendor/magnific-popup.js?ver=1.5.9' id='bp-nouveau-magnific-popup-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/select2.full.min.js?ver=1.6.6' id='select2-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/progressbar.min.js?ver=1.6.6' id='progressbar-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme/assets/js/vendors/mousewheel.min.js?ver=1.6.6' id='mousewheel-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/navigation.js?ver=20181209' id='wporg-developer-navigation-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/skip-link-focus-fix.js?ver=20130115' id='wporg-developer-skip-link-focus-fix-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/search.js?ver=20150430' id='wporg-developer-search-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/menu.js?ver=20180201' id='wporg-developer-menu-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/awesomplete.min.js?ver=20160322' id='awesomplete-js'></script> <script type='text/javascript' id='autocomplete-js-extra'> /* <![CDATA[ */ var autocomplete = {"ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","nonce":"7565d63b50"}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/autocomplete.js?ver=20160524' id='autocomplete-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/function-reference.js?ver=20180724' id='wporg-developer-function-reference-js'></script> <script type='text/javascript' id='quicktags-js-extra'> /* <![CDATA[ */ var quicktagsL10n = {"closeAllOpenTags":"Close all open tags","closeTags":"close tags","enterURL":"Enter the URL","enterImageURL":"Enter the URL of the image","enterImageDescription":"Enter a description of the image","textdirection":"text direction","toggleTextdirection":"Toggle Editor Text Direction","dfw":"Distraction-free writing mode","strong":"Bold","strongClose":"Close bold tag","em":"Italic","emClose":"Close italic tag","link":"Insert link","blockquote":"Blockquote","blockquoteClose":"Close blockquote tag","del":"Deleted text (strikethrough)","delClose":"Close deleted text tag","ins":"Inserted text","insClose":"Close inserted text tag","image":"Insert image","ul":"Bulleted list","ulClose":"Close bulleted list tag","ol":"Numbered list","olClose":"Close numbered list tag","li":"List item","liClose":"Close list item tag","code":"Code","codeClose":"Close code tag","more":"Insert Read More tag"}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/quicktags.min.js?ver=5.7.2' id='quicktags-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/user-notes.js?ver=20181019' id='wporg-developer-user-notes-js'></script> <script type='text/javascript' id='wporg-developer-user-notes-feedback-js-extra'> /* <![CDATA[ */ var wporg_note_feedback = {"show":"Show Feedback","hide":"Hide Feedback"}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/user-notes-feedback.js?ver=20181023' id='wporg-developer-user-notes-feedback-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/tabs.js?ver=20160824' id='wporg-developer-tabs-js'></script> <script type='text/javascript' id='wporg-developer-preview-js-extra'> /* <![CDATA[ */ var wporg_note_preview = {"ajaxurl":"https:\/\/www.buddyboss.com\/resources\/wp-admin\/admin-ajax.php","nonce":"8c71850def","preview":"preview note","preview_empty":"Nothing to preview","is_admin":""}; /* ]]> */ </script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/js/user-notes-preview.js?ver=20181019' id='wporg-developer-preview-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-content/themes/buddyboss-theme-resources/assets/js/scripts.min.js?ver=5.7.2' id='resources-scripts-js-js'></script> <script type='text/javascript' src='https://www.buddyboss.com/resources/wp-includes/js/wp-embed.min.js?ver=5.7.2' id='wp-embed-js'></script> <script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam-cell.nr-data.net","licenseKey":"NRJS-b7ce844947f3d4601ad","applicationID":"510428083","transactionName":"ZwAGMRdVDRBRV0ZcDV5KJQYRXQwNH0dbWwVcAA==","queueTime":0,"applicationTime":351,"atts":"S0cFR19PHh4=","errorBeacon":"bam-cell.nr-data.net","agent":""}</script></body> </html>