Forums

[resolved] Theme can't find subdirectory (9 posts)

  1. EsteMart
    Member
    Posted 9 months ago #

    Hello,

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

    http://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:

    http://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?

  2. bjornhall
    Member
    Posted 9 months ago #

    Did you make a new wordpress installation. or did you move the database and files to the new location?

  3. EsteMart
    Member
    Posted 9 months ago #

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

  4. EsteMart
    Member
    Posted 9 months ago #

    Could it be a database issue?

  5. EsteMart
    Member
    Posted 9 months ago #

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

  6. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

    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)

  7. EsteMart
    Member
    Posted 9 months ago #

    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.

  8. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

    Try:

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

  9. EsteMart
    Member
    Posted 9 months ago #

    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!

Reply

You must log in to post.

About this Topic