• <div class="reply">
    <a href="/title_of_article/?replytocom=1263#respond">reply</a>
    </div>

    should be

    <div class="reply">
    <a href="/blog/title_of_article/?replytocom=1263#respond">reply</a>
    </div>

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • and because the reply links are relative and not absolute

    Why? You should always use absolute urls in WordPress.

    Thread Starter Marc Toensing

    (@marcdk)

    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.

    Thread Starter Marc Toensing

    (@marcdk)

    I use wordpress on three different domains with different themes. Look in the html source. It is relative.

    Look here: https://demo.opensourcecms.com/wordpress/?p=1 Relative path in the sourcecode.

    Thread Starter Marc Toensing

    (@marcdk)

    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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘comment reply link points to 404 pages’ is closed to new replies.