• stemple

    (@stemple)


    Howdy all,
    After a few weeks of tinkering and malingering, I’ve discovered I’m not smart enough to figure out what I want to do.

    My worpress theme at https://www.lucidus.ca is sort of half done. I’m trying to figure out how to post linkable images in the left-side column.

    What you see now is just a placeholder. How would I set it up so I could have 5 pictures/links on the left side? (Each picture linking to a separate article).

    I’ve learned how to do everything else by cribbing off other themes, but no one else has done this. I imagine I’d make five seperate things in sidebar.php and then reference them from style.css. I can’t get that to work however. Also, is there some way to do this that will be easy to manage and update (avoiding having to go through sidebar.php to change links, etc).

    Also, please criticize the site. (I know it doesn’t validate, I’m some way from getting that straight.)

    Thanks.

    (sorry about the cross post but I think I put the first one in the wrong spot)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Kafkaesqui

    (@kafkaesqui)

    Background images are not linkable. You can set up the div or other HTML element the background resides in to provide the link (similar to this), but for the image itself to be linked, it must be referenced with the <img> tag.

    Thread Starter stemple

    (@stemple)

    thanks for the suggestion.
    i’m trying to implement it currently.
    one other question. Is there any way to set up divs that function as image containers?
    I don’t have any idea what I’m talking about.
    Here’s a better question. Has anybody seen a wordpress 1.5 blog with linkable images in the sidebar?
    Thanks.

    infovore

    (@infovore)

    I’ll try and explain this later; what you want *is* possible. Essentially, you make a link in text within a div, and set the size of the div to the size of your image. Then, you make the text invisible. As a result, you have a clickable image but the image is a background-image, not in an img tag. And if you’re viewing in text only, it’ll still work fine, as the text stops being hidden there.

    Only problem is: your background image is presumably related to the article? It’d be possible, I think, to have the url for the image as a Custom Field, but altering the image is tricky because the path to the image is referenced in the css file which isn’t dynamic.

    OK, here’s how I’d do it: include image url as a custom field in the post. Make sure all images are always the same size. Place the image in a div wherin any links are dimensions x *y – this is tricky. Then, your link, image, article are all rendered dynamically, the link size is all that’s in the css.

    Thread Starter stemple

    (@stemple)

    whew, you’ve given me some good ideas. I’m going to try and work it out tonight. it’s funny that this is so hard to do — it seems like it should be easy.
    thanks.

    davidchait

    (@davidchait)

    Yes, there are a bunch of ways. I guess it depends on what you want to show up? Do you want images attached to articles (I assume yes)? How do you want to specify which articles get images shown?

    If you check out my site (www.chait.net), I have a plugin called CG-Inline that is both how you see thumbnails next to each article, and is how you see a list of amazon products, pulled from the current list of articles (or article), in the left sidebar.

    If you want to manage it 100% manually, you can hand-embed the HREF block around the IMG tag.

    If you want to manage it semi-automatically, you likely need a way to tag images to articles, and what articles to try to pull images from, and how many to show. That data can be ‘cached’ during the post loop handling and eventually shown in the sidebar (that’s how I do the amazon list, for example), OR as a separate query on the database to find the posts and graphics. Though if they aren’t going to change much (say once a week, versus maybe adding posts once a day), you’ll likely want something to cache the posts/graphics to show so you don’t hit the database every time the page loads…

    I’m happy to point you in the right direction… ??

    -d

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘help with new blogazine (crosspost)’ is closed to new replies.