Ultimate Category Excluder
[resolved] Exclusion from home page results in exclusion from custom archives page (3 posts)

  1. ericminikel
    Posted 2 years ago #

    Awesome plugin! Thrilled with how easy it is to use.

    I have a custom archives.php page which I created based on this guide. My code is as follows:

    Template Name: Archive page
    $posts_to_show = 1000; //Max number of articles to display
    $debut = 0; //The first article to be displayed
    <?php while(have_posts()) : the_post(); ?>
    <h2><?php the_title(); ?></h2>
    $myposts = get_posts( "numberposts=$posts_to_show&offset=$debut" );
    foreach($myposts as $post) :
    <li><?php the_time('d/m/y') ?>: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>
    <?php endwhile; ?>

    I have discovered that using UCE to exclude a category from the home page results in also excluding it from this custom archives page. I can't figure out why.

    Not a big deal and totally not your problem, but figured I'd mention it in case there is an easy solution.

    Thanks again.


  2. Michael Clark
    Posted 2 years ago #

    Hi Eric,

    Easy solution, since you are using a hand-crafted template page: just remove my plugin from that page. On the line before your $myposts=… add this line


    That will disable my plugin from kicking in on that one page only. At least, it appears to work on my site. Let me know either way, Mike

  3. ericminikel
    Posted 2 years ago #

    Brilliant! Yes, that worked! Thanks for your help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ultimate Category Excluder
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.