WooPress Child Images - by tryingwebman - on WordPress WooCommerce support

This topic has 4 replies, 2 voices, and was last updated 8 years, 9 months ago ago by Stan Russell

  • Avatar: tryingwebman
    tryingwebman
    Participant
    July 15, 2015 at 12:11

    Hi id like to favour images in my child theme over the parent if they exist.
    I’m not sure which functions to pull over or where to put them?

    I believe the below is something to do with it?

    get_template_directory_uri()

    I’m not experienced in PHP so any help would be appreciated?

    Jamie

    3 Answers
    Avatar: stan
    Stan Russell
    Participant
    July 15, 2015 at 12:32

    Hello,

    would you kindly describe your request with more details? It is a bit unclear for us. What results do you want to achieve?

    Regards
    Stan Russell.

    Avatar: tryingwebman
    tryingwebman
    Participant
    July 15, 2015 at 12:47

    Hi Stan my apologies.

    I have WooPress installed and i have just installed WooPress child and copied over styles etc

    Now what i would like to do is for example the image “Payments” when woo press is updated copies over my custom image with your default one.

    I would like to place the custom image in the child images directory so the image comes from there rather than the parent woo press theme.

    Is there a line i can add to my child themes functions to enable this? Or would i need to change the href to every image?

    Avatar: stan
    Stan Russell
    Participant
    July 15, 2015 at 15:01

    Hello,

    1. In your child theme add a folder /images/
    2. Add your image to this folder
    3. In your child theme style.css add your style element,
    for example this code:

    .image1{
     background-image:url(http:yoursite.com/woopress/wp-content/themes/woopress-child/images/assets/shopbanner.jpg);
    }

    Regards,
    Stan Russell.

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.