WordPress.org

Ready to get started?Download WordPress

Forums

3 column theme places images in third column (2 posts)

  1. cregy
    Member
    Posted 3 years ago #

    Hi All

    I do hope Christmas brought some excellent surprises.

    I am hoping that someone might be able to help me on this one please? Is it possible to build a theme that has 3 columns. What I would like to be able to do is to use the columns like this:
    1st Sidebar:
    Widgets, links etc
    2nd Sidebar
    All images relating to the post
    Content
    Post details only. No images.

    A huge thanks for any help and a happy new year to all.

    Kind regards

    Rich

  2. cregy
    Member
    Posted 3 years ago #

    I have been doing a bit of research and this post suggests a way of doing exactly what I want. The post is out of date though and the function element is not recognised. Does anyone know how to update please?

    The post
    http://wordpress.org/support/topic/add-a-pictureimage-on-the-sidebar?replies=15#post-867826

    The code:

    function postimage() {
     // get the post meta info
      $key = "postimage";
      $id = get_the_ID();
      $custom = get_post_meta($id, $key, true);
      echo $custom;
    }
    <?php
    $image = new WP_query ('showposts=1');
    if(have_posts()) : while($image->have_posts()) : $image->the_post; ?>
    
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php postimage(); ?></a>
    
    <?php endwhile; endif; rewind_posts; ?>

    Thanks

    Rich

Topic Closed

This topic has been closed to new replies.

About this Topic