• Resolved EsteMart

    (@estemart)


    Hello,

    I’m moving a custom theme from one of my company’s old websites to re-skinning for a new project.

    https://www.moncherimobile.com/designerlife/

    I’ve managed to get the css up and running, but some of the scripts for the page need to find items from the wp-content/uploads folder. However, I get errors in Firebug saying it can’t find the folder:

    https://moncherimobile.com/UploadsScreen.png

    It seems to be missing the directory in which everything is located in (‘designerlife’). I had a similar issue with my css in which I set the import to a relative link to fix it, but I can’t seem to do the same here. Is there anyway to reset the theme so it can find the ‘designerlife’ directory?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Did you make a new wordpress installation. or did you move the database and files to the new location?

    Thread Starter EsteMart

    (@estemart)

    I made a completely new installation on a separate hosting service, then moved a copy of the theme folder over to the new location

    Thread Starter EsteMart

    (@estemart)

    Could it be a database issue?

    Thread Starter EsteMart

    (@estemart)

    Still scratching my head over this one. Anyone have any ideas as to what could be the issue?

    The image urls may be hardcoded within the relevant template files when they should be using something like <?php echo home_url( '/' ); ?>wp-content/uploads/foo.jpg. Alternatively, move the item to a sub-folder of the theme and use <?php get_stylesheet_uri();?>/subfolder_name/foo.jpg)

    Thread Starter EsteMart

    (@estemart)

    I took esmis’ advice and switched out the problem code

    background: url(wp-content/uploads/<?php the_author_meta(‘illustration’); ?>);”> </div>

    with

    background: url(<?php echo home_url(‘/designerlife/’); ?>wp-content/uploads/<?php the_author_meta(‘illustration’); ?>);”> </div>

    But am still getting 404 errors. I’ve tried site_url as well and still no luck.

    Try:

    background: url(<?php echo home_url('/'); ?>wp-content/uploads/<?php the_author_meta('illustration'); ?>);"> </div>

    Thread Starter EsteMart

    (@estemart)

    Esmi

    Sorry I haven’t responded. That’s definitely a step in the right direction and with some slight modifications to other parts of the site, I’m no longer getting errors.

    Thanks a lot!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Theme can't find subdirectory’ is closed to new replies.