What theme is this? It might be possible to do it via custom fields but it would take some additional PHP coding.
Thread Starter
giec
(@giec)
ah sorry, here’s the link to it http://andys.antonioborrillo.co.uk/wp/. I am sure there is an easy way just changing the html and css. If not, unfortunately I don’t know any php, so if that’s the only way then I will have to do it through the dashboard
Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes.
Thread Starter
giec
(@giec)
yes, as I said in my post, i already have a child theme created and the associated child folders
Thread Starter
giec
(@giec)
with that in mind, any idea? : – )
Do you have an images/headers folder in your child theme with your new banner images?
Thread Starter
giec
(@giec)
that’s correct esmi, I have an image/headers in my child theme. There is only one image in there at the moment but I am planning to add a few more. The thing is though, the banner still has the old images
Try adding your new images using register_default_headers in your child theme’#s functions.php file. You can get rid of the default ones from the parent theme by using unregister_default_headers.
Thread Starter
giec
(@giec)
uhm, thanks but I don’t know much about php I am afraid, so I am not entirely sure how to use the function. If I add the new images using the dashboard, is it ok anyway? I mean can I replace the old ones?
You can add as many new images as you want via Appearance -> Header. And you don’t need a child theme for this either. What you can’t do is remove any of the original banners except by unregistering them in a child theme.
Thread Starter
giec
(@giec)
ah I see, no the thing is I need to remove the original images and replace them with mine in my child theme. If I remove all the current images from the image->headers folder and replace them with mine, wouldn’t that be enough – bearing in mind that eventually I will need to move the wordpress site to another domain and probably a different host.
So, to do that I have to resort to the register_Default_heading I seem to understand. I had a look at the link you sent me but I am not sure how to construct the function
Thread Starter
giec
(@giec)
I mean I have found this post, so I was wondering if I can do the same thing. I don’t mind changing images in the parent folder as long as the change is permanent http://wordpress.org/support/topic/how-to-change-the-headerbanner-image-in-my-theme?replies=7
Not if you are using the Twenty Eleven theme or a Twenty Eleven child, no.
Thread Starter
giec
(@giec)
oh no. Ok then, if I remove the original images from the parent theme and replace them with mine, all this using the dashboard of course, what happens when I then transfer the wordpress site to a different domain and probably a different hosting provider? DO I lose all the images and need to copy them again into the folder? If so, could you possibly give me some advice as to how to use the php function as you mentioned earlier on? I mean if it isn’t too difficult maybe I can have a go myself
thanks
Thread Starter
giec
(@giec)
ok, maybe it isn’t as complicated as I have thought.
so here’s part of the function with the array:
register_default_headers( array(
'wheel' => array(
'url' => '%s/images/headers/wheel.jpg',
'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Wheel', 'twentyeleven' )
),
...
Assuming I have copied the images I want to use in the images->headers folder in my child theme /public_html/andys/wp/wp-content/themes/twentyeleven-child/images/headers. Say I have 2 images: image1.jpg and image2.jpg.
How should I change the function to?
-in the 'wheel' => array(
I guess I don’t have to change ‘wheel’;
-the url, is the path the same, apart form the file name? 'url' => '%s/images/headers/image1.jpg',
-Same for the thumbnail?
-how about the description, does is stay the same?
thanks