Support » Themes and Templates » probelms with banner images

  • Hi there, I would like to modify the images in the banner section. I was told to change them from the dashboard – appearance – header, but what if I want to change them manually?
    I have created a child theme folder and I have created an image->header folder too. I have added my new image there, but the banner hasn’t change. Any suggestion please?
    thanks

Viewing 15 replies - 1 through 15 (of 32 total)
  • esmi

    (@esmi)

    Forum Moderator

    What theme is this? It might be possible to do it via custom fields but it would take some additional PHP coding.

    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

    esmi

    (@esmi)

    Forum Moderator

    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.

    yes, as I said in my post, i already have a child theme created and the associated child folders

    with that in mind, any idea? : – )

    esmi

    (@esmi)

    Forum Moderator

    Do you have an images/headers folder in your child theme with your new banner images?

    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

    esmi

    (@esmi)

    Forum Moderator

    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.

    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?

    esmi

    (@esmi)

    Forum Moderator

    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.

    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

    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

    esmi

    (@esmi)

    Forum Moderator

    Not if you are using the Twenty Eleven theme or a Twenty Eleven child, no.

    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

    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

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘probelms with banner images’ is closed to new replies.