Here is an example of what I’ve done:
<?php
$link = home_url( '/members/' . bp_core_get_username( bp_displayed_user_id() ) . '/followers/' );
echo "<a href="". esc_attr( $link ) ."">Followers</a>";
?>
So maybe its home_url
now, than site_url. In the echo, esc_attr
gives out the $link.
Change the whole bp_core_get_username( bp_displayed_user_id() )
to whatever you need – wp_get_current_user()
for example.
Related Posts:
- How to reorder billing fields in WooCommerce Checkout template? [closed]
- How to add a custom CSS class to core blocks in Gutenberg editor?
- No filter of code on switch from html to visual editor, how?
- How to modify posts_where filter only for the search query
- Filter translations (gettext strings) on specific admin pages
- Filter hook before create order WooCommerce
- How to auto-translate custom user roles?
- Adding revision support to WooCommerce product content
- Changing text within the Block Editor
- add_filter for specific pages
- How to add attribute to output with wp_video_shortcode add_filter
- Change default settings used by gallery shortcode
- PHP5, Inheritance, Singleton – action & filter hook limitations
- Please explain me what the do_action does
- How Can I Have A URL Changed Based on the Originating URL?
- Is it possible to Hook/Filters Attachment Creation?
- Add ‘if exists’ to filter
- how to remove filter from wordpress shortcode output
- Change email from and display name with a filter action
- How to check if “media_send_to_editor” is audio?
- Changing Order of Filters
- Please help me through this example with a filter to understand how they work
- Filter custom post types in archive
- WordPress tag cloud add more links
- How can I filter block registration based on post-type? (Block alignment settings)
- wp_insert_post_data filter not working correctly after upgrade to WordPress 5
- Yoast SEO hooks overriding themselves
- Passing variable from child theme to parent theme
- Question about how do wordpress filters/actions work
- How to center oEmbedded content
- Add Sortable Column For All Post Types
- How to take options from form fields and turn them in to links?
- When to use add_action when registering/enqueuing scripts
- wp_insert_post_data filter hook identify current action
- Add Class to a div using a filter?
- How to link the whole list item in Gutenberg’s latest posts block?
- Remove Extra Classes from Post Title
- Upload file if contains certain name
- Filters/Bulk Actions return wrong URL in admin dashboard
- I want to allow the use of a data-flw attribute in links in comments
- What hooks to hook onto for automatic cache clearing
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- Add filter to get_posts
- How can I output all apply_filters and do_action?
- Override has_post_thumbnail function
- How to allow code block in wordpress comments
- remove_action: how to access to a method in an child class?
- Set default value for “Additional CSS class(es)” for specific block types
- WordPress add script with custom type (x-jquery-tmpl)
- Woocomemrce order and registration fileds to UPPERCASE
- add_filter to wp_nav_menu_objects having no impact
- Change login CSS
- How to redirect non-logged in users to login with post_password_required()
- Trimming a custom field to a length
- How to add nonce tag to inline script for CSP
- Filter content for get_the_content()
- Using add_filter to modify a public function of a class
- How to hide/remove GhostKit component panel in gutenberg block inspector
- How to override include_once pointed file using add_filter?
- How to strip out javascript in wp_posts `post_content`
- WordPress removing slashes from shortcode output
- Register new user, assign custom role then send email
- pre_get_posts to hide everywhere posts from “Archive” category
- What is the action or filter for adding information under the Permalink in Edit Post/Page?
- add after content don’t work
- Adding a filter to related posts not working
- need correction with a snippet in functions.php [closed]
- conditional search
- output custom Posts on a Page
- Filter “Your latest posts”
- Sql query does not work well
- Hide certain product filters from specific product categories
- WordPress Gutenberg core/heading block (wp-block-heading)
- Add an attribute to the root from functions.php with add_filter
- Would like to use hook or filters to customize email templates
- Removing menus from users other than the administrator
- Can’t understand apply_filter logic
- Why does wp_die() not work when inside a namespace?
- Apply pre_get_posts filter in a certain moment (just for a particular block of posts)
- Modify oembed code conditionally
- How to Change the WordPress Locale with the ‘locale’ Filter?
- meta box loop problem with a search filter
- Modify Default URL for /wp-includes/js/wp-emoji.js?ver=4.6.1
- List all image sizes still getting disabled sizes
- wp_editor customization
- What problems could happen if I replaced add_filter and add_action with the function calling
- posts_results filter function memory errors
- Adding to an array & passing it through do_action/apply_filters
- Is it possible to include the add_filter() function within a shortcode function
- Activate short codes for all post queries?
- Save something to global var in add_filter
- Loading a sidebar on an Ajax call
- the_excerpt() does not work with has_excerpt()?
- Replace Paid Shipping Method With Free Shipping Method WooCommerce [duplicate]
- Wrapping Featured Image on Add/Edit Page in div?
- Clean/filter HTML inserted to post content by XML RPC
- how to localize the number of wordpress post views?
- How do you disable the verification process of user email changes?
- Modify the third (context) parameter in a filter?
- Limit total tags in the_content