lokjah
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: List post titles by category?thanks for all the help alphaoide ??
Forum: Fixing WordPress
In reply to: List post titles by category?sweet, last thing is there anyway that I can add multiple categories? I have a news link that i want to show posts from a few categories…
<?php query_posts('cat=1,4,5&showposts=3'); ?>
is that written right?
Forum: Fixing WordPress
In reply to: List post titles by category?ok that one works!
now where its showposts=10
is there a way to substitute the # (10 in this case) with something like “all” or will I need to use some exorbidant # like 999 ?
Forum: Fixing WordPress
In reply to: List post titles by category?no that throws the same error as using “cat”
the one that works sort of is the one i posted above:
<?php $my_query = new WP_Query('category_id=1&showposts=10'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<h2 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
<?php endwhile; ?>that works but doesnt show just category 1 posts, it shows 1, 5 and 6 like the error message states above.. so that is coming somewhere from the original example you pointed me to
Forum: Fixing WordPress
In reply to: List post titles by category?also interesting is that bit:
AND (category_id = 1 OR category_id = 5 OR category_id = 6)
those are the very categories that were showing up in addition to category 1
Forum: Fixing WordPress
In reply to: List post titles by category?cat=1
returns an error:WordPress database error: [Not unique table/alias: ‘mainwp_post2cat’]
SELECT DISTINCT * FROM mainwp_posts LEFT JOIN mainwp_post2cat ON (mainwp_posts.ID = mainwp_post2cat.post_id) LEFT JOIN mainwp_post2cat ON (mainwp_posts.ID = mainwp_post2cat.post_id) WHERE 1=1 AND (category_id = 1) AND post_date_gmt <= ‘2005-05-05 02:02:59’ AND (post_status = “publish”) AND (category_id = 1 OR category_id = 5 OR category_id = 6) GROUP BY mainwp_posts.ID ORDER BY post_date DESC LIMIT 0, 999Forum: Fixing WordPress
In reply to: List post titles by category?this seems to be working, although it doesnt just list category_id=1 posts, it lists others as well…..
Forum: Fixing WordPress
In reply to: List post titles by category?ok ive got something like this so far, am I doing it right?
<?php $my_query = new WP_Query('category_id=1&showposts=10'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<h2 id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
<?php endwhile; ?>Forum: Fixing WordPress
In reply to: List post titles by category?<?php $my_query = new WP_Query('category_name=special_cat&showposts=10'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
// Do stuff.
<?php endwhile; ?>this one? if so, im not quite sure how to use it. do I just need this loop by itself?
and “category_name” how would I use the category ID?
thanks alphaiode
Forum: Fixing WordPress
In reply to: put the_date in ul with format in li’sthanks kafka, i’m still a noob at php so it takes me a bit to get a hold of what to do,
i know about the tag only the first time its called, thats what i was expecting my script above to do, but it wasnt doing that.
this you posted works, it actually puts a date on every entry which is fine, I just wondered why the original the_date in my script wasnt working….
Forum: Fixing WordPress
In reply to: put the_date in ul with format in li’sstill havent been able to figure this one out, help much appreciated ??
Forum: Fixing WordPress
In reply to: put the_date in ul with format in li’srats… thought it was sussed…
for some reason my script above doesnt work like the_date
as it should- (only showing the date on the first post when there are multiple posts on one day)…on days with more than one entry my script writes an empty
<ul class="datelist">
</ul>which throws off the validation of my site…..
is there something that needs to be added in my script so that it behaves as the_date by default on multiple posts?
Forum: Fixing WordPress
In reply to: put the_date in ul with format in li’sexcellent kafkaesqui
I was reading that page actually all nite and forgot to put that piece into the script…
thanks a ton!
Forum: Fixing WordPress
In reply to: comment redirect script?heh nothing like a convo with yourself….
I really think this may do what I need?
for individual posts, ryans plugin:
and Kafkaesquis for categories:
custom posts categories templates
given my situation am I looking in the right direction? will both of these work with rss and function like any other post?
Forum: Fixing WordPress
In reply to: comment redirect script?could conditional tags be my help ???
hope hope