• I display parent level categories on my site as separate pages, the way that WordPress naturally sets them up. I have a handful of these top-level category pages, and they are in my main nav.

    I installed the update of the plugin to 1.3.3 and two, not all, but just two of my category pages showed as “Not Found” when you went to them.

    I have reverted to the older 1.3.1 version of the plugin, and everything is fine again, but I am at a loss as to how to fix this in order to update the plugin again. Any ideas?

    Thanks!

    https://www.ads-software.com/plugins/cpt-onomies/

Viewing 3 replies - 31 through 33 (of 33 total)
  • Sorry for the late reply, your code will print the following result

    [0] => author
        [1] => bereiche
        [2] => bilderalben
        [3] => bilder_tags
        [4] => category
        [5] => link_category
        [6] => nav_menu
        [7] => ngg_tag
        [8] => post_format
        [9] => post_tag
        [10] => videoalben
        [11] => videostichwort

    There are indeed some older custom taxonomies, but they have different names from the CPT-onomies, that don’t show up in this list.

    Hello Rachel – Fantastic plug-in, but bad news I’m afraid as I think I’m having a related issue.

    Its on a site that’s due to go live on Sunday, so is in the last stages of dev.

    By default wordpress category pages (category.php) also show posts from child categories, which is exactly what I want.

    I created a CTP-taxonomy with your plug-in and for a few days thought everything was fine. Now noticed that posts from any NEW categories (created after installing CPT-onomies) do not show up on a parent category.php page. However posts from child-categories created before creating the CPT-onomy still display as expected. The archive sole for a child cat still works fine.

    Removed most stuff from functions.php and disabled plugins until I stumbled on CPT-onomies as the culprit. If I deactivate the child-category, posts come back on the parent category page.

    Removing just the CPT-onomy doesn’t fix it, the posts only come back if I disable the plugin completely.

    For what it’s worth, the parent cats and sub cats that are affected are the standard wordpress Post type. There’s no CTP-onomy or custom Taxonomy attached to them at all.

    Happy to help troubleshoot where I can.
    Thanks
    Stef

    edit: PS ran the snippet you suggested above but there’s only the standard taxonomies listed

    Array
    (
        [0] => category
        [1] => nav_menu
        [2] => post_format
        [3] => post_tag
    )

    Okay – so the issue is still there. I contemplated removing CPT-onomines, but it’s such a great tool that I really want to keep it. At the moment I’m just using it to link Reviews (existing CPT) and FAQs (existing CPT) to Products (existing CPT), with products being the CPT-onomy.

    I figured a rough and ready work-around that seems to be doing the trick and allowing me to see any new child-categories on a standard category.php page.

    All I did was to force the query on category.php pages to look at sub-categories too. Now it no longer misses any child-categories added since installing CPT-onomies. Currently I’ve tweaked the Query directly in the template file, but suspect I should’ve done it via pre_get_posts instead.

    My code probably isn’t that elegant and I’m sure there’s probably a leaner way to do it, but I’ve added the following snippet of code before the loop on a category.php

    <?php if ( have_posts() ) : ?>
    
    <?php
    // Tweaking the query in category.php to make sure it looks at child categories.
    // Should probably be using pre_get_posts instead
    
    if (is_category()) :
    	$category = get_category(get_query_var('cat'));
    	$child_cats = array();
    	$child_cats = get_term_children( $cat, 'category');
    	$args = array(
    	'category__in' => $child_cats
    	);
    	query_posts( $args );
    endif;
    ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post();

    Cheers
    Stef

Viewing 3 replies - 31 through 33 (of 33 total)
  • The topic ‘1.3.3 broke categories on my site’ is closed to new replies.