• I installed WordPress with the following parameters
    Site installation : https://mywebsite/subdirectory
    Home : https://mywebsite

    And wp comments do not work anymore. I get a 404 Error.

    Therefore i had to replace in Gantry file : comments.html.twig
    The line
    <form action="{{ site.url }}/wp-comments-post.php" method="post" id="commentform">
    by
    <form action="{{ site.url }}/subdirectory/wp-comments-post.php" method="post" id="commentform">

    site.url takes “Home” instead of “Site”

    There is certainly a better way, but couldn’t find it.

Viewing 1 replies (of 1 total)
  • Plugin Author Gantry

    (@gantry)

    The site.url variable comes from the Timber and as far as I know there isn’t another one when you manually define home page and install WP in the sub-directory.

    Until Timber adds new variable that will point to the WP core url, your workaround should be just fine.

Viewing 1 replies (of 1 total)
  • The topic ‘Bug if wordpress is installed in a sub directory’ is closed to new replies.