WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Where to store header images (10 posts)

  1. gilliancs
    Member
    Posted 3 years ago #

    On my old sites, each with a separate installation, each had a header picture stored in the theme folder. This isn't working any more so I'm trying to work out where best to put them and how to reference them. I'm using Sandbox with a skin I adjusted myself so it's not a problem to change it.

    If anyone has a tip, I'd be grateful

  2. You can still do this, so long as each theme is different, though I'd probably make child themes.

    Is the header the ONLY thing different?

  3. gilliancs
    Member
    Posted 3 years ago #

    Yes, it is different in each site.
    I had thought to put the images in the uploads folder for each site and reference them from there. (Which is why I'm looking for the folder!).

  4. wp-content/blogs.dir/#/files :)

    And that may be a way around it. If you coded your header to pull the image from the sitenumber like that, you could grab it.

    Say put the image in wp-content/blogs.dir/1/files/header.jpg

    And then in your header.php, call the location based on what blog you're in.

  5. Use the media up-loader on each site to upload specific headers for those sites.

    Then reference them in your css for each site.

    http://wordpress.org/extend/plugins/safecss/ may help.

  6. gilliancs
    Member
    Posted 3 years ago #

    I rather want to avoid using different templates for each site so I've called the image from within the header html of the my theme. I then used an absolute top-positioning to force the header text on top of the image. The only problem (in Safari) is a slight flash the first time the page is loaded when the text is drawn where it would normally appear (below the image) and then is quickly redrawn. I can't think of another way to do it.
    This is the code to call the image. The image is stored in the files folder of the child site.Get settings home gets the url of the child site.

    <img src="<?php echo get_settings('home') ?>/files/headerpic.jpg">

  7. I wasn't suggesting different templates at all - I was suggestion the *same* template, but using the css plugin to change the header for each site.

    Much like if you had a blog at wordpress.com and had the css upgrade.

  8. gilliancs
    Member
    Posted 3 years ago #

    That sounds very useful. However, I looked at the plugin and there's a minimal description of what it does and nothing on how to use it:
    All CSS code is stored in wp_posts using a custom post_type of customcss. This allows us to use the built in revision engine. The CSS is filtered through CSS Tidy and KSES for security.
    When I installed it I wasn't any the wiser. I haven't ever had a wordpress.com blog.

    By the way, your site replicator plugin, WP-Replicator, is a dream. It's saved me so much time.

  9. David Sader
    Member
    Posted 3 years ago #

    http://en.support.wordpress.com/custom-css/

    Look for the FAQ: "How can I upload images for use with my CSS?"

  10. gilliancs
    Member
    Posted 3 years ago #

    Perfect. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic