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?
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?
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
EsteMart
Member
Posted 9 months ago #
Could it be a database issue?
EsteMart
Member
Posted 9 months ago #
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)
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.
Try:
background: url(<?php echo home_url('/'); ?>wp-content/uploads/<?php the_author_meta('illustration'); ?>);"> </div>
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!