Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   HINT: moving your images out of the Atahualpa folder (http://forum.bytesforall.com/showthread.php?t=11852)

juggledad Dec 22, 2010 05:53 AM

HINT: moving your images out of the Atahualpa folder
 
As of Atahualpa version 3.7.12 this is now a theme option see: Atahualpa 3.7.12 - how to save your header images across updates

Note: Due to a wordpress requirement, as of 3.6 you need to fully qualify the path names.

Short Description: Put images in 'wp-content' so you don't have to move them during upgrades of the theme.

As of Atahualpa 3.4.7, you can use PHP in the CSS Inserts and several other options of Atahualpa. A great feature of this is to use one of the dynamic PHP functions - bloginfo('template_url') - to point at the template path. This will work no matter what you name the Atahualpa folder. This is perfect for referencing any of the included Atahualpa images. But what if you have a custom image?? Up to now, you had to put your image in the Atahualpa folder and them move it when you upgraded the theme.

The PHP function bloginfo() has some other options you can pass it and 'wpurl' is the one we want to use. It returns the url of the WordPress folder. By adding 'wp-contents' and a folder of your own to the path, you can use a folder of your own that is outside the theme folder.

Note this doesn't work for the header images...yet...

1) create a folder in the 'wp-content' folder called 'my-atahualpa-images'
3) put all your custom images in 'my-atahualpa-images'
4) reference your images with
HTML Code:

<?php bloginfo('wpurl'); ?>/wp-content/my-atahualpa-images/image1.jpg
So instead of
HTML Code:

div.widget ul li { background: url('<?php bloginfo('template_url'); ?>/images/myimage1.jpg') no-repeat 0 7px }
you would use
HTML Code:

div.widget ul li { background: url('<?php bloginfo('wpurl'); ?>/wp-content/my-atahualpa-images/myimage1.jpg') no-repeat 0 7px }
That's it. Now the next time you upgrade Atahualpa, you won't have to move the images or change the theme options to point at where the images are located.

Rational Design Studio Dec 30, 2010 01:45 PM

Nice one, thanks. Hopefully the development of Atahualpa will make the site-specific content more modular to ease theme updates.

Malau Oct 2, 2011 01:13 AM

Hi Juggledad,

I could not open a New Thread as such would like to address my problem here and hopefully you can help me. Tried Support but still no reply after more than 1 week.

I am using Atahualpa 3.6.7 and 2 weeks or more a go, ALL Graphics that was supposed to be shown on my Wp-Content/Upload/2011 Folders were not displayed ALTHOUGH they are all still present.

See here: http://www.howtomakemoneywithacomputer.info

I tried so many times diagnosing the problem but still clueless.

Can you give me some pointers?

Greatly appreciate your help,

William Siong

juggledad Oct 2, 2011 02:47 AM

This hint no longer works because WordPress required the developer to remove the code that allowed php in the options.

You will have to change the code and use the full path to the images

Also make sure you have the 3.6.7 patches applies - see the New Versions & Updates forum


All times are GMT -6. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.