I’m building an articles directory site using the “Articles Directory” plugin and theme and one of the suggested add-on plugins is giving me a 404 error.
Could someone please have a look at the code to see what’s wrong with it? I would like to have it running in a 2.5.1 environment (in a sub folder) and using pretty permalinks.
<?php
/*
Plugin Name: Kinderlose
Plugin URI: https://guff.szub.net/kinderlose
Description: Remove posts from child categories in (parent) category queries.
Version: R1
Author: Kaf Oseo
Author URI: https://szub.net
Copyright (c) 2007 Kaf Oseo (https://szub.net)
Kinderlose is released under the GNU General Public License (GPL)
https://www.gnu.org/licenses/gpl.txt
This is a WordPress 2.3 plugin (https://www.ads-software.com).
Inspired by Michael D. "mdawaffe" Adams' Just One Category and
Rich Hamilton's No SubCats.
*/
function kinderlose_where($where) {
if ( is_category() ) {
global $wp_query;
$where = preg_replace('/.term_id IN \(\'(.*)\'\)/', '.term_id IN (\'' . $wp_query->query_vars['cat'] . '\') AND post_type = \'post\'', $where);
}
return $where;
}
add_filter('posts_where', 'kinderlose_where');
?>
Thanks,
Gene
TIA
]]>Inspired by Michael D. “mdawaffe” Adams’ Just One Category and Rich Hamilton’s No SubCats plugins, Kinderlose provides a WordPress 2.3 solution.
To download:
https://guff.szub.net/kinderlose/
I have a category called ‘Adult Services’ There is one post detailing the Adult Services area posted in this category. There are two sub-categories under Adult Services; one called ‘Get a Library Card’ and one called ‘Reference Research’. If I click the parent, Adult Services’ category, posts from the sub-categories display in the page, and I’d like them not to.
Is it possible to do what I described above? The site url is: https://www.yourppl.org/new . If you have any better ideas in ways to organize the content, I am all ears.
Thanks,
Terry