gerld
Forum Replies Created
-
Forum: Plugins
In reply to: Exclude category from the loop?i’m assuming i could use this code… but how would i modify it to exclude multiple categories ?
function modify_where_clause($where) {
global $wp_query, $wpdb;
if ($wp_query->is_home && !strstr($where,’category_id’))
$where .= ” AND ID NOT IN (SELECT post_id FROM $wpdb->post2cat WHERE category_id=2)”;
return $where;
}
add_filter(‘posts_where’,’modify_where_clause’);also, i’m not sure exactly where to put that little bit of code, or how to call it. can anyone help ?
Forum: Plugins
In reply to: Exclude category from the loop?i have the same question as highwind.
ALSO.. i’ve managed to use a few ifelse statements to exclude the categories i want from the loop, but i have the same problem as the original poster in this thread.
how can i exclude the categories but still preserve the recent post count ??
Forum: Fixing WordPress
In reply to: is it possible to exclude categories using wp_get_archives ?awesome that works. thanks so much!
Forum: Fixing WordPress
In reply to: is it possible to exclude categories using wp_get_archives ?i tried the exact code listed on codex
<?php
$myposts = get_posts(‘numberposts=5&offset=1&category=3’);
foreach($myposts as $post) :
?>
<?php the_content(); ?>
<?php endforeach; ?>it just outputs a blank page
Forum: Fixing WordPress
In reply to: is it possible to exclude categories using wp_get_archives ?i tried getposts but it doesn’t seem to work in wp 2
Forum: Requests and Feedback
In reply to: “Special” pages for ongoing topics.awesome. i’m SOOOO close.
using help from the asides site located here, https://codex.www.ads-software.com/Adding_Asides
thank goodness for the rewind loop function! i didnt know that existed!
anyway,
i’m able to get the sidebar listing and my main listing excluding the asides, however… when i go to single post view, and navigate using the previous and next links, the asides still show up. but when you click on them it obviously just takes you to a page not found error since i’m excluding them from the loop.any ideas on how to hack the previous and next links so the asides dont show up???
I”M SO CLOSE!!
Forum: Fixing WordPress
In reply to: Paged navigation broken after query_posti guess basically i want to be able to run the loop twice on the page with different results. is this possible?
Forum: Fixing WordPress
In reply to: Paged navigation broken after query_posti am having this exact same problem.. and am not sure how to fix it.
i want to run a query_post BEFORE the main loop, but whenever i run one the main loop also takes the commands as the 1st query_post
how can i
run query_post,
then set it back to default and then run the main loop?
Forum: Fixing WordPress
In reply to: is it possible to exclude categories using wp_get_archives ?i’ve pretty much read through every single post with an exclude tag.. and i don’t understand why this is so difficult.
there surely has to be a simple way to do this
Forum: Fixing WordPress
In reply to: is it possible to exclude categories using wp_get_archives ?i managed to exclude category 3 on my main content, and INcluded it in the sidebar,
however, now whenever i click on a single article… i see all of them instead of the individual article (i tried adding the same query_posts exclude to the single.php page, but it still shows all articles .. except category 3 obviously)
i have no idea why this is. any ideas?
Forum: Installing WordPress
In reply to: permalinks 404 … on a brand new installahh, i didn’t have an .htaccess file in the root folder for some reason
Forum: Requests and Feedback
In reply to: “Special” pages for ongoing topics.hey everyone.. this is pretty much what i’m trying to do.
for example, i have category “technology” which i DO NOT want included in my main wordpress content, but i DO want it on a sidebar.
how exactly do i implement the above code to
a) list the 10 most recent articles in category “technology” on my sidebar
b) exclude the category “technology” from my main wordpress content
any help would be greatly appreciated!!
Forum: Installing WordPress
In reply to: single article viewi just need to know what the code is to link to a single article
right now i’m using this and it’s showing all the articles.
<span class="small"><?php the_category(', ') ?> </span></td></tr>
<tr><td class="contentheading" width="100%">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> </td></tr>
<tr><td><div class="copy"><span class="author">By <I><?php the_author() ?></I>, <?php the_time('F jS, Y') ?></span>
<?php the_content('Read more »'); ?></div>
Forum: Installing WordPress
In reply to: single article viewit’s beccause of something i did. i’m trying to customize a theme to look how i want it. but i’m not sure what i changed that’s wrong.