The function get_author_posts_url
retrieves the url where the posts of a certain author are to be found. If you change the url, that doesn’t mean the posts are moved.
In other words, you have moved a sign directing you to Buckingham Palace and expect that by doing so you also have relocated the palace. In effect, as you found out, you end up in the middle of nowhere.
Also beware that since you are modifying the existing filter author_link
, the modification will also apply to calls originating in other functions. If you want to apply a filter to a custom made function, it is better to define a custom named filter as well.
Related Posts:
- Get the blog page URL set in Options
- Why when I submit a form in wordpress it loads a 404 page though URL is correct
- How to set permalink structure via functions.php
- Different ways to display title
- How Do I Programmatically Force Custom Permalinks with My Theme?
- Different wordpress 404 template for different post type [duplicate]
- How to display wp_nav_menu() conditionally only when not on a 404 page?
- Link won’t show using the_permalink();
- get_query_var() and permalinks
- WordPress 404 page returning with default in IIS7
- WordPress custom post type permalink: website.com/post-name/post-id
- paged > max_num_pages won’t throw 404
- WordPress Theme’s 404 File Getting Called Every Page Load?
- Filter categories used with Custom Structure Permalink
- How to make permalinks update from code?
- Default Permalink Type to Postname
- How to set a page as homepage in stead of the newspages?
- Getting author URL outside the loop
- I used single quote to design HTML of my WordPress blog. Now site redirects to index.php everytime than page.php or single.php
- Issue On Displaying Pages with Post Name Permalink
- Issue on Getting Custom post type Thumbnail’s URL
- WordPress page/blog incorporated into static website
- Only the latest post shows up on post page?
- Twenty Twelve Author not displaying
- How to remove permalinks links presents in each page of my site?
- If I remove Category base from my URLs, how difficult will rollback be?
- What are the permalinks options for “Category” base and removing it?
- How do I open a post in a custom page in wordpress?
- Does single webpage do not need navigation to create a slug in permalink?
- Getting post URL within custom content template
- How to display latest posts with authors image
- I want to change the author name
- Detect error 404 page to find out the issue
- Mamp pro permalink issues. Pages keep reverting to index.php
- 404 on child page template
- Permalinks problem with custom theme
- Permalink Setting Changes From Post Name to Default After Changing The Page Name
- Configuring static page with add_rewrite_rule gives 404 after navigating to Permalinks admin panel
- Menu items description? Custom Walker for wp_nav_menu()
- How to define and link full path to css located at a random folder on header.php
- Sizing screenshot.png without losing aspect ratio
- Software for WordPress Theme and Plugin Development? [closed]
- When to use is_home() vs is_front_page()?
- What is the preferred way to add custom javascript files to the site?
- How to create .pot files with POedit?
- After server migration only the homepage works
- How do I get the theme URL in PHP?
- What is the constant WP_USE_THEMES for?
- Worthwhile to restrict direct access of theme files?
- How Do I Protect My Premium WordPress App Theme from Copying?
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- How to add posts to custom menus?
- WordPress Theme Preview Image
- How To extend WP_Customize_Control
- What is the difference between front-page.php and home.php? [duplicate]
- How can I get page slug
- Changing permalinks gives me 404 errors on nginx
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- When to use _e and __ for the translation?
- What is a Theme textdomain?
- How to show a custom meta box on the “Quick Edit” screen?
- How to add CSS class to custom logo?
- How to add custom css file in theme?
- How important is it to enqueue a theme’s stylesheet?
- CSS not updating in browser when I change it
- Display Search Result Count
- wp_nav_menu(), how to change class?
- theme path in javascript file
- Is wp_is_mobile() effective?
- Display Menu Name using wp_nav_menu
- Making update notification functionality for my themes
- What questions do you ask when asked to give an estimate on theme development?
- How to remove dashicons.min.css from frontend?
- How do I remove a pre-existing customizer setting?
- Minimum Template Files for Theme Development
- Getting hierarchical custom post type permalinks to work just like pages
- What’s the difference between home.php and index.php?
- pass object/JSON to wp_localize_script
- get_template_part vs action hooks in themes
- Theme Activate Hook
- Solutions for generating dynamic javascript / CSS
- wp_redirect() – headers already sent
- Can I create my own “Recent Posts” widget or customize the existing one?
- Custom single template for a specific category
- how can I add an icon/image for a child theme?
- How can I add a URL field to the attachments window?
- The the_post_thumbnail without srcset?
- The proper way to include/require PHP files in WordPress
- Get the first image from post content (eg.: hotlinked images)
- after_setup_theme always runs
- When to use add_action(‘init’) vs add_action(‘wp_enqueue_scripts’)
- Getting failure when using filemtime() with wp_enqueue_style
- Do I actually need to link my theme’s style.css in the theme files
- Why is wp_head() creating a top margin at the top of my theme header?
- How to store widget fields data as an array?
- How do I add version control to my workflow?
- Using classes instead of global functions in functions.php
- WordPress API Menu/Submenu Order
- How can I display a menu on certain pages only?