Just ran that exact code snippet on WP 3.3 to test. In practice, <a href="#">test</a>
is rendered in the markup correctly, but the browser will attempt to navigate to http://example.com/current-page/#
when you hover over the link or click on it.
This is the expected behavior of a link like this … so unless you have other code on the page that’s actively changing the links, this is what I’d expect to see.
Tested under both Chrome and IE just to make sure I wasn’t crazy.
Related Posts:
- Filter any HTTP request URI?
- How to link current user to their author page through shortcodes
- How to filter post content and force every link () made in blocks to return urldecode() with readable value?
- Filters/Bulk Actions return wrong URL in admin dashboard
- Changing WordPress core without hacking core
- Change custom post type GUID in RSS
- Change URLs in default WordPress slider to relative from absolute
- URL to filter posts by post meta similar to shop/?product_cat=”painting”
- Change url to posts if they have custom tax only
- what is __return_false in filters
- Passing Additional Parameters to add_filter Callable
- How can I add an Author filter to the Media Library?
- Custom theme hooks / filters – passing arguments
- Change upload directory on custom plugin page
- What params are available with the_content filter?
- How to hook wp_list_pages?
- Don’t replace “|” with Empty String (“”) when generating slugs from title
- apply_filters(‘the_content’, $content) alternative
- How to use the_excerpt in a filter hook?
- Add wrapper to only youtube videos via embed_oembed_html filter function
- Changing document title only on a custom page template
- Shortcodes not resolved in AJAX call response
- Possible to filter the posts or categories that XML-RPC users see in their mobile application?
- Ajax, filters and shortcodes
- wp_link_pages output appears twice
- Multiple Ajax Data Action
- Add filter to wp_dropdown_pages() or wp_dropdown_categories() – no select container?
- Hook different functions to the same filter conditionally OR Pass additional arguments to existing filter?
- How do I pass the value from a foreach loop to an add_filter function? [closed]
- Change WordPress RSS link with filter?
- Search results sorted by post types
- How to remove get_post_metadata using remove_filter inside a class?
- Pass parameter to the upload_dir filter
- Filter or Hook to catch pre-rendering of post content
- Sorting and limitation with pre_get_posts
- Warning: Missing argument 2 for widget_title filter
- check to see if hook is available
- Use add_filter on concatenated string variable
- Filter users by custom colum not meta key
- How do I hide the current page’s title?
- How to allow users to view pending posts of a specific custom post type?
- Remove filter callback: method in class
- How to filter meta_values using REST API
- Header image automatically changes depending on season
- How do I use remove_action on an add_action that uses an array?
- Admin Backend – Search Pages only by title
- How to hide Ads in between posts on AMP? [closed]
- What is the downside of using a filter as a “poor man’s” dependency injection?
- Add content as soon starts
- Access get_the_title() from ‘excerpt_length’ filter
- Wrong post_status notice after wp_insert_post_data
- BBPress changing default group activity
- Comment search plugin
- Filter the_content to add something before each element?
- How to display the content HTML of a page without displaying the gallery code as well
- How to add_filter to an OOP based apply_filter(‘foo::bar’, $a);
- Help with filter for wp_notify_moderator()
- filter hook to load a different post/page on current post/page
- Conflict calling an add_filter() twice
- Filter for author list in gutenberg core editor
- How would I be able to use a font awesome icon as a user’s avatar?
- Add something after a filter
- add_filter the_content doesn’t work
- Redirect to woocommerce checkout after adding to cart – item already in cart
- `authenticate` filter never gets called
- Add filter unless it is being called under specific function
- Filter / add_action to upgrade.php page
- Is there a filter to programmatically change the HTML tab switching output of the page editor?
- Image not showing up in media loader success area – followup
- Disable Remember Me in Login Form
- How do I add a line break to a string that is output by PHP?
- Problem width wp_insert_post_data and Gutenberg block editor
- Counting a WP_Post Object value in an arary, using a filter?
- style_loader_tag not changing stylesheet to preload
- add_filter doesn’t return false?
- List all categories that have results in a query
- Distinguish between page and post in function
- Display posts from today and future in Elementor ‘posts widget’
- Right filter for rewriting page statuscode
- Changing title using filter not working with argument
- Archive Widget – Count only parent posts
- How to filter page title for certain page?
- Replace Text with hyperlinks
- adding an action inside if condition not working
- Adding filter to an specific page/site direction
- Cutting off excerpt with first sentence
- Print url to default featured image
- Change add_filter based on Ajax
- What action/filter can be used for modifying the page to be rendered?
- Adding user filter – Not updating data in URL
- check, if any “add_action” function contains string XXXXXXXXX
- How to add more than one custom metadata as filter on the post list page?
- Add Default WordPress Formatting To Data From External SQL Tables?
- Joining tables not working in the post editor page
- Auto append text after the title?
- filter a list by gender
- add_filter(‘the_content’, ‘method’) does not trigger my custom method
- How to elect position of new item output in a dropdown when using add_filter
- Filter a custom post type by custom field in admin
- Search and Filter Using Custom Post Type, Custom Taxonomy, and Advanced Custom Fields