• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Category archive pages not working

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Category archive pages not working

This topic is: resolved

Tagged: Category archive pages

  • This topic has 2 replies, 1 voice, and was last updated 7 years, 1 month ago by asbilly92.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 18, 2016 at 1:41 pm #179331
    asbilly92
    Participant

    I have a genesis based child theme and my Category archive pages are not working... how can I fix this?

    I have a few categories already set up, but when I go to: http://www.mydomian.com/category/mycategory I'm getting an error that says: "Sorry, no content matched your criteria." Even though both items have the specific categories checked in their respective pages...

    I'm using the latest version of wordpress, genesis and the Author Pro theme. Just FYI

    ** I also already tried: from this Studiopress site... How to Create a Category Blog Page still didn't work...
    ** I have already tried revisiting and saving my Permalinks too

    (sorry this site isn't live yet)

    Any help would be appreciated!!

    http://Site isn't live yet
    February 18, 2016 at 5:06 pm #179351
    asbilly92
    Participant

    Sorry, I just wanted to add that these are CUSTOM POST TYPES, that I made with a plugin... that seems to be the problem maybe, but I need help with the code to get these custom post types working with they show up in archive pages. I got some code from a blog post but it does really odd stuff to the Admin area and gives me a heart attack!

    February 19, 2016 at 7:47 am #179386
    asbilly92
    Participant

    This is the code that ultimately FIXED my issue:

    //add custom post type to tags and categories
    function add_custom_types_to_tax( $query ) {
    if( ( $query->is_category() || $query->is_tag() ) && $query->is_main_query() ) {
    
    // Get all your post types
    $post_types = array('post' , 'my-custom-post-type');
    
    $query->set( 'post_type', $post_types );
    }
    return $query;
    }
    add_filter( 'pre_get_posts', 'add_custom_types_to_tax' );

    **Above code came from: Post where code came from

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Category archive pages not working’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble