kr3wks8r231
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Featured Article/ Image above BlogYes, i just explained it, that code wil display one post from category 4. You just need to make a category named featured, then replace the ID in the code. After that you make a post with a custom field of post-img, and type in the url of the im, so like wp-content/themes/yourtheme/images/yourpic.jpg then it will display your one featured post.
Forum: Themes and Templates
In reply to: Featured Article/ Image above BlogI did something like this, i used this code. You need to get the ID of the catigory and replace it in the code, and you also need to make a custom field named post-img then fill out the image path.
<?php if(have_posts()) : ?> <?php $recentBlog = new WP_Query('cat=4&showposts=1'); ?> <?php while($recentBlog->have_posts()) : $recentBlog->the_post();?> <div> <?php $postimageurl = get_post_meta($post->ID, 'post-img', true); if ($postimageurl) { ?> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_directory'); ?><?php echo $postimageurl; ?>" alt="<?php the_title(); ?>" /></a> <?php } ?> </div> <?php endwhile; ?> <?php else: ?> <?php endif; ?>
Forum: Themes and Templates
In reply to: Arras-Template: Seperate slideshow for each CategoryTry this..
<div class="featured clearfix"> <div id="controls" style="display: none;"> <a href="" class="prev"><?php _e('Prev', 'arras') ?></a> <a href="" class="next"><?php _e('Next', 'arras') ?></a> </div> <div id="featured-slideshow"> <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <?php $ = new WP_Query('cat=5&showposts=4'); ?> <?php while($frontpage->have_posts()) : $frontpage->the_post(); ?> <div <?php if ($count != 0) echo 'style="display: none"'; ?>> <?php $w = 630; $h = 250; if ( arras_get_option('layout') == '3c-r-fixed' || arras_get_option('layout') == '3c-fixed' ) { $w = 480; $h = 225; } ?> <a class="featured-article" href="<?php the_permalink(); ?>" rel="bookmark" style="background: url(<?php echo arras_get_thumbnail($w, $h); ?>) no-repeat;"> <span class="featured-entry"> <span class="entry-title"><?php the_title(); ?></span> <span class="entry-summary"><?php echo arras_strip_content(get_the_excerpt(), 20); ?></span> <span class="progress"></span> </span> <?php endwhile; else: ?> <?php endif; ?> </div> </div>
Forum: Themes and Templates
In reply to: a page where posts display inline, 3 in a row?Yea do something like
<div id="container"> <?php if(have_posts()): while(have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h3><?php the_title(); ?></h3> <p><?php the_content(); ?></p> </div> <?php endwhile; else: ?> <div class="post"> <h3>Error!></h3> <p>There is no content because you didn't make any posts yet!</p> </div> <?php endif; ?> </div>
Then style it.
#container {width:900px; margin:auto; height:auto; } .post {width 300px; height:100px; float:left;}
Something like that, i really didn’t take much time so there might be a few errors,
Forum: Themes and Templates
In reply to: Grab content from another page?Thank you, I wonder if someone knows how to make a a limit to a varible. maybe something like
<?php $about_page = limit('50') ?>
If only it was so easy.So does anyone know how to apply a character limit to this?