wordpress Q
- Started
- Last post
- 11 Responses
- forcetwelve
so if i wanted to specify a <div> or an area in my layout that i could post an image/text to through wordpress - what is the best way to do it?
categories/plugins?
thx.
- airey0
is it in a post or a page template element or what exactly?
- FallowDeer0
yeah what are you trying to do?
as if you want text/image to come up you would just run the loop in that div?
- forcetwelve0
sorry - it's in a 2 column layout that uses pages, in a div that is the right column.
- forcetwelve0
yeah that's right...
- forcetwelve0
custom fields seem like the go
- Stugoo0
Carefuls wordpress has been hacked!
- FallowDeer0
yeah the first thing would be to add a cutom field for the image, or you could do align the image left or right of the text
- forcetwelve0
i think i'm onto it.... get_posts?
my category id = 3
here is my code - but it's not working.
<?php $posts = get_posts( "category=3&numberposts=1" ); ?>
- FallowDeer0
<?php query_posts('showposts=1&cat=3'); ?>
- FallowDeer0
for example
<div>
<?php query_posts('showposts=1&cat=3'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
</div>
- forcetwelve0
thx so much. works perfectly!