Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$50
Exclude categories from loop and pagination problems
Problem 1: The main column loop only excludes the posts from selected category in one of the sidebars. The other still shows in the main loop.
Problem 2: During all this loop fixing, the pagination (link to Older Posts furthest down), doesn't work.
Send me an email to sven.salmonsson@gmail.com and I'll send the login details.
This question has been answered.
LeTune | 02/03/11 at 10:01am
Edit
The experts have suggested, on average, a prize of $20 for this question.
(5) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-
Last edited:
02/03/11
10:06am -

Last edited:
02/03/11
10:09amDavid Navarrete says:you can try with this type of loop?
<?php $query = new WP_Query(array('category__not_in' => array(1,2,3), 'showposts' => 10 )); ?>
<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
-

Last edited:
02/03/11
10:22am -

Last edited:
02/03/11
10:29amChris Lee says:You could just install Advanced category excluder to solve this:
http://wordpress.org/extend/plugins/advanced-category-excluder/ -

Last edited:
02/03/11
12:25pmSébastien | French WordpressDesigner says:in the file myhome.php
replace
<?php $exc = get_category_id ( ( get_option('mmcp_sidecat') ? get_option('mmcp_sidecat') : 'uncategorized') ); ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('cat=-'.$exc.'&posts_per_page=5&
paged=' . $paged); ?>
by
<?php
$exc = get_category_id ( ( get_option('mmcp_sidecat') ? get_option('mmcp_sidecat') : 'uncategorized') );
$exc_two = get_category_id ( ( get_option('mmcp_sidecat2') ? get_option('mmcp_sidecat2') : 'uncategorized') ); ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts('cat=-'.$exc.',-'.$exc_two.'&posts_per_page=5&
paged=' . $paged); ?>
Previous versions of this answer: 02/03/11 at 11:55am | 02/03/11 at 12:03pm
- 02/03/11 12:00pm
Sébastien | French WordpressDesigner says:about the pagination
replace
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('cat=-'.$exc.'&posts_per_page=5&paged=' . $paged); ?>
by
<?php $page = get_query_var( 'page' );
query_posts('cat=-'.$exc.'&posts_per_page=5&paged=' . $page); ?> - 02/03/11 12:06pm
Sébastien | French WordpressDesigner says:I have edit the first message because the line which start by "$exc_two" must use mmcp_sidecat2 (and no mmcp_sidecat)
it's very important :-)
- 02/03/11 12:00pm
This question has expired.
Current status of this question: Completed
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
