Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Image Path Help

  1. #1
    Regular Coder
    Join Date
    Aug 2013
    Posts
    158
    Thanks
    23
    Thanked 0 Times in 0 Posts

    Image Path Help

    *Had a long day, figured this out right when I typed it, so dumb*

    Hey,

    I got a very basic question that seems easily solved but Im having a hard time finding it on google.

    So, I added a custom CMS system to a wordpress site for a client, where they can add images and text. However, since the pages are in a different directory than the index. The Images only show on the index page but once you click on a seperate pages the image links are all broken.

    So as of right now my image path is just like this
    Code:
    <img src="http://www.codingforums.com/images/imagename.jpg" alt="ImageName"/>
    *EDIT* In Case you don't know
    Code:
    ../
    directs the path to the root folder.

    In case I didnt explain it well enough lets say the directory on the server has ;

    index.php
    [folder-images]
    [folder-wordpressPages]

    So when I am on the index page then looking for the folder images works fine. But once I go to a new page the page is looking for the folder "images" inside of wordpressPages and it is not finding anything because the folder is not in there.

    Any thoughts?
    Last edited by 7daytheory; 03-21-2014 at 07:28 PM.

  • #2
    Regular Coder
    Join Date
    Aug 2013
    Posts
    158
    Thanks
    23
    Thanked 0 Times in 0 Posts
    I'm an idiot, sorry long day. I got it


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •