The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Define site URLs for sub-directory site

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #235066


    I have developed a child theme which has some pre-designed page layouts. I have stored the theme images in a theme directory called images and used image path like this
    It works fine. When the theme is installed in a user site, the image path takes the user site and makes it an absolute URL like /wp-content/themes/mytheme/images/an-image.png
    Now the problem happens when the user site is on a sub-directory. Like

    The path is then broken making the image path like this /sub-directory//wp-content/themes/mytheme/images/an-image.png

    If I remove the first forward slash (/) from the pages, then it works.

    Is there any function or way to solve this issue? Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.