steverydz
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Adding class to current post in sidebarCheers, that solved it. Here’s the code I used:
<?php get_header(); ?> <div id="content" class="group"> <div id="content-pri"> <?php if (have_posts()) : while (have_posts()) : the_post(); $current_project = get_the_ID(); ?> <h2 class="entry-title"><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; endif; ?> </div> <!-- // #content-pri --> <aside> <h3>Recent projects</h3> <ul> <?php $loop = new WP_Query(array('post_type' => 'portfolio')); while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php if ( $post->ID == $current_project ) { ?> <li class="current-project"><?php the_title(); ?></li> <?php } else { ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php } ?> <?php endwhile; ?> </ul> </aside> </div> <!-- // #content --> <?php get_footer(); ?>Forum: Fixing WordPress
In reply to: How to add class to last list itemNot to worry. I’ve figured out that IE7 and 8 support :first-child but not :last-child so I can use that instead.
Forum: Themes and Templates
In reply to: Query posts and custom fieldsNo I haven’t seen that. Thank you, hopefully it will help.
Forum: Themes and Templates
In reply to: Query posts and custom fieldsI can’t seem to separate the loops basically. Obviously I’m going about this the wrong way.
I used the query post tag with showposts=4 for the images and for the blog I want to use a regular loop to display the last 5 posts excluding the portfolio.
My problem is that both loops are reading the showposts from both sections and therefore I can’t keep the right number of posts in each section.
Forum: Themes and Templates
In reply to: Query posts and custom fieldsI’ve seen a screen cast where he explains thats how he inserts them. I can insert them in manually however I need them to be dynamic as I update my portfolio.
Forum: Themes and Templates
In reply to: Help with creating a new template please :)Thats quite an in depth question there. Are you already familiar with HTML and CSS?
Forum: Themes and Templates
In reply to: Inline ThumbnailsHeres an article which explains what I think you’re asking?
http://www.greg-wood.co.uk/blog/article/a-nice-little-css-positioning-technique