Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter samaritan

    (@samaritan)

    The links look like this:
    https://my.college.edu/mysite/wp-admin/tools.php?page=wp-table-reloaded&action=options

    We have many plugins that are installed and working, both at the multi-site level and for individual sites/blogs, with many different templates. The WPMU setup is running as expected in all other ways.

    Thank you for your help in looking at this. This plugin looks like exactly what we need.

    — Daniel

    Hmmm.. I may be able to help.

    I think what you want to do should be pretty straight forward when creating custom templates. Each post would have a thumbnail in the Excerpt, and the full size image in the post contents. In your template for displaying the posts, you display the excerpt wrapped in a link to the full post, and the single post template can be customized to display only the parts you want.

    Now, I have custom templates that already do things very similar to this:

    This template is for a specific category listing and is named category-10.php in my theme folder. When I go to that category, it finds this template and uses it instead of the archive.php template. This includes the logic for counting posts and puting them in columns (but not the styles).


    <?php
    /*
    Template Name: Gallery Category
    */
    ?>
    <?php get_header(); ?>
    <div id="content">
    <?php
    $postnum = 1;
    $columns = 3;
    ?>
    <?php if (have_posts()) : ?>
    <h3 class="pagetitle"><?php echo single_cat_title(); ?></h3>
    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>
    <div id="gallery">
    <?php while (have_posts()) : the_post(); ?>
    <div class="gallery_item">
    <a href="<?php the_permalink() ?>"><?php the_excerpt_rss(); ?></a>
    </div>
    <?php if ($postnum == $columns) {
    echo '<hr style="clear:both; visibility:hidden;" />';
    $postnum = 1;
    } else $postnum++;
    ?>
    <?php endwhile; ?>
    </div>
    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>
    </div>
    <?php else : ?>
    <h2 class="center">Not Found</h2>
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    <?php endif; ?>
    <?php include (TEMPLATEPATH . '/gallery-sidebar.php'); ?>
    <?php get_footer(); ?>

    This one is for the single posts for a given category. I have a plugin enabled that allows children categories to inherit the template of the parent. I modified it so that posts in children category inherit the single post template of the parent category. That way, all my gallery subs would have the same gallery single post view. You will notice that I have not included any comments or metadata in the post view. You will want to include your ratings and comments.


    <?php
    /*
    Template Name: Gallery Single
    */
    ?>
    <?php get_header(); ?>
    <div id="content">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="paragraph" id="post-<?php the_ID(); ?>">
    <h3 style="<?php the_title("-image-"); ?>"><span style="<?php the_title("-image-"); ?>"></span><?php the_title(); ?></h3>

    <div class="p1">
    <div id="gallery_single">
    <?php the_content(); ?>
    </div>
    <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    </div>
    <p class="postmetadata">
    <?php edit_post_link('Edit this entry.','',''); ?>
    </p>
    </div>

    <?php endwhile; else: ?>
    <p>
    Sorry, no posts matched your criteria.
    </p>
    <?php endif; ?>
    </div>
    <?php include (TEMPLATEPATH . '/gallery-sidebar.php'); ?>
    <?php get_footer(); ?>

    I hope that is helpful.

    Actually, here is a single post that does not display *anything* but the_content():

    https://www.beesnest.org/go/gallery/

    Flush:

    I used a custom single post template to control the display in my gallery, and left out all the parts I did not want. In the catagory/gallery page I showed only the excerpts, and the excerpts had a thumbnail linked to the post:


    <a href="<?php the_permalink() ?>"><?php the_excerpt_rss(); ?></a>

    You can see this here:
    https://www.beesnest.org/go/gallery/clothing/

    And here is what my custom single post looks like:
    https://www.beesnest.org/2006/09/24/scarf-skirt/

    Old thread, but I modified the plugin to handle single template, rather than category template. I emailed it to you Kaf.

    I have a gallery_item class in my stylesheet:

    #content .gallery_item {
    float:left;
    width:185px;
    }

    At some point I may add a gallery specific id and move the gallery_item class

    I set $postnum = 1; $columns = 3; after header, but before have_posts().

    After the post itself, I have:

    if ($postnum == $columns) {
    echo ‘
    < css clear element using hr >
    ‘;
    $postnum = 1;

    } else $postnum++;

    (enclosed in php script tags, of course)

    Or, I suppose that if the postnum == 3 it could be reset to 1, rather than continually incrementing.

    Thank you! That is what I was looking for. In that case, I could find out if postnum is devisable by 3 and add a CSS clear element. Right?

    I am going to start working on a modified loop category template, that displays 3 thumbnail images in a row, and has 12 items on a page. It will use 4 (or less, depending on the number of posts in a category) get_posts(“category=10&numberposts=3″) calls with each next call including “&offset=x” where x is the number of posts that have already been output.

    How does the class=”post < ? php whatever the post code is here ? > ” > do anything? It might number the post, but how does it actually make the post output a new post? That is the part that seems to be a problem. How do you format three different posts if your loop only outputs one?

    In my case, I am using a category template to display the excerpt image for posts in a given category. The excerpt links to the post.

    Again, I think the problem is in the loop, and the fact that the standard loop only formats one post at a time. This is why I think a modified loop that grabs 3 posts at a time, and uses offsets might work better, although it would add complexity to the code.

    If I am totaly wrong, please provide examples of a standard loop allowing formatting of a specific number of posts (ie. inserting a seperator between posts 5 and 6, or hilighting every 8th post).

    I think we have made it clear that we are trying to do something we are not sure how to do, so telling us that it can be done is just not quite enough. The original post asks for examples of blogs that do this, and so far no one has been able to point to any.

    Flush:

    Yes, I looked at that. I am still not sure that will do exactly what we want. I am looking at this:

    https://rhymedcode.net/1001-wordpression-loops/grouped-by-category/

    But using the same category for each, and adding an offset to the get_posts() call for each subsequest row. In order to display all posts, you would need to continue incrementing a counter, and I am not sure how to do that in php yet.

    It is frustrating that other commentors continually assert that it can be done, and easily, but cannot provide any examples to work with. The one that you link to is basic, but does not acually show how it could be done in WordPress. The part that is not being explained is how to actually output 3 post groups in the template, since the loop handles one. The alternatives that I have seen for controling the number of posts are being used for displaying multiple categories, not for formating a number of posts in the same category.

    Flush:

    I am interested in the same thing, and I was about to *ahem* flush out the details. I don’t think it is a matter of only CSS, so I will post back here if I find anything.

Viewing 14 replies - 1 through 14 (of 14 total)