• Resolved erm3designs

    (@erm3designs)


    I have created PAGES within WP 3.9 and then I copied my custom code into the HTML editor within WP. Now the paths to the images I need to place a relative path – because I’m placing my initial design on my server, so once approved by client – I need to migrate it over to their servers.

    Current server example:
    <img src=”https://www.erm3designs.com/blog/wp-content/uploads/2014/05/CONTENT_Visit-Store_icon.jpg”&gt;

    I have tried:
    <img src=”<?php bloginfo(‘template_url’); ?>/images/image.jpg”>, but it does not “keep” this PHP code within “PAGES” – but it does work for FOOTER images and HEADER images.

    BIG QUESTION:
    Is there a solution, so when I migrate to another server – I do not need to go back thru 14 PAGES I created for this custom WP site and change the PATHS to the images?

    Thanks in advance for any help.

Viewing 1 replies (of 1 total)
  • Thread Starter erm3designs

    (@erm3designs)

    Looks like I found the solution from someone, going to share – hope this helps someone in the FUTURE!

    Within PAGES the URL to resources would look like this:
    for internal RESOURCES that you must upload to the WP library: (images, PDF files, mov, etc) use: [upload_dir_url]/nameoffile.*

    For Linking to OTHER PAGES:
    for internal LINKS in WP use: [url]/PageName/

    NOTE:
    You must add to Function.php the following code:

    function upload_dir_shortcode() {
    $upload_dir = wp_upload_dir();
    return $upload[‘url’];
    }

    Hope this makes sense, because it worked for my needs to migrate to another SERVER.

Viewing 1 replies (of 1 total)
  • The topic ‘Not Working for PAGES -IMG paths!’ is closed to new replies.