jungledsales
Forum Replies Created
-
Thank you! That worked just like I wanted!
That looks good, but I must not be coding it right, because that didn’t work for me. So would I add that like this?
<?php $args = array( 'post_type' => 'attachment', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_mime_type' => 'image' ,'post_status' => null, 'numberposts' => null, 'post_parent' => $post->ID ); $alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true); $image_title = $attachment->post_title; $caption = $attachment->post_excerpt; $description = $image->post_content; $attachments = get_posts($args); if ($attachments) { foreach ( $attachments as $attachment ) { ?> <a href="<?php echo wp_get_attachment_url( $attachment->ID, false ); ?>" rel="lightbox" title="<?php echo $image_title; ?>"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?h=75&w=75&zc=1&src=<?php echo wp_get_attachment_url( $attachment->ID , false ); ?>" alt="" width="75" height="75" border="0" /></a> <?php } } ?>
Forum: Plugins
In reply to: Secure WordPress PluginI’m having the same issue. Is this a bug?
Forum: Themes and Templates
In reply to: Display custom field post data in gridOk I got this working finally, but then I did an update to 2.6.5 and it broke. The code below was working and now it’s not. Any suggestions?
<?php while (have_posts()) : the_post(); $thumb = get_post_meta($post->ID, 'Thumbnail', $single = true); ?> <div id="grid"> <div class="productsgrid"> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <?php if($thumb !== '') { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"> <img src="<?php echo $thumb; ?>" class="grid-thumbnail-class" alt="<?php if($thumb_alt !== '') { echo $thumb_alt; } else { echo the_title(); } ?>" /> </a> <div style="clear:both;"></div> <?php } else { echo ''; } ?> </div> </div>
Forum: Themes and Templates
In reply to: Display custom field post data in gridWell sort of… except I don’t know how to call the custom fields from an entire category. I want to be able to add more posts and have this page automatically update and add more fields to the grid.
Forum: Themes and Templates
In reply to: comments2 instead of <?php comments_template(); ?>chaoskaizer: Thanks. The first code suggestion worked.
<?php comments_template(DIRECTORY_SEPARATOR.'comments2.php'); ?>
richarduk: I used Ryan Boren’s plugin at https://boren.nu/archives/2005/03/13/custom-post-templates-plugin/ to create multiple templates for single.phps
It’s especially nice since you can do each category individually like you do in your code above or you can have it display a unique template based on the post ID. Very cool stuff.
Forum: Plugins
In reply to: alphabetical listingJust found this and it works great for me:
Forum: Fixing WordPress
In reply to: the_title() does not maintain hyphens in urlBeautiful! It works. Thanks.
Forum: Fixing WordPress
In reply to: the_title() does not maintain hyphens in urlBecause the permalink is not the same as my desired URL. The permalink would be https://www.domain.com/post1 and I want the output URL to be https://www.domain.com/recommends/post1
So I just need a way to grab the post title and append it to a URL. But without losing the hyphens.
I’ll play a little more with str_replace but I don’t think that will work.