and because the reply links are relative and not absolute
Why? You should always use absolute urls in WordPress.
Ok, tell this this function:
comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );
It generates a relative url.
It always produces absolute urls on my installs.
I use wordpress on three different domains with different themes. Look in the html source. It is relative.
Look here: http://demo.opensourcecms.com/wordpress/?p=1 Relative path in the sourcecode.
Our solution in the functions.php
<?php echo str_replace("href='","href='/blog" ,get_comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) )); ?>
/blog is our subdirectory in this case. Works. But isn’t there an easier way?
(@marcdk)
12 years ago
should be
The blog is located at domain.com/blog/ and because the reply links are relative and not absolute. This occurs with all plugins disabled and the standard twenty-ten theme.
I changed the doman settings in the backend both the domain.com/blog but the links are still without the /blog/ at the beginning.