[Resolved] Category entries

Home Forums Support [Resolved] Category entries

Home Forums Support Category entries

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #562368


    I add info on my blog via pods.io plugin for custom posts and I’m using wordpress categories to group my entries. However, when I click on a category name, I get a Nothing found page and the search bar.

    Any idea how could I display this entries?


    GP Premium 1.6.2

    I already tried to add to functions.php the following codes:

    add_filter('pre_get_posts', 'query_post_type');
    function query_post_type($query) {
     if(is_category() || is_tag()) {
       $post_type = get_query_var('post_type');
            $post_type = $post_type;
            $post_type = array('post','review');
        return $query;


    add_action( 'pre_get_posts', function ( $q )
        if (    !is_admin() // Only target front end queries
             && $q->is_main_query() // Only target the main query
             && $q->is_category() // Only target category archives
        ) {
            $q->set( 'post_type', ['post', 'review'] ); // Adjust as needed

    It didn’t work.

    Lead Developer
    Lead Developer

    Hmm, that’s strange.

    What are your permalinks set to in “Settings > Permalinks”?

    Can you deactivate your custom functions, then re-save the permalink settings?


    I forgot to change the permalinks and it was set to Date and time. Now it’s set to Post name.
    What do you mean by Custom functions?

    Meanwhile I found a solution via a very old plugin: Custom posts type archive (https://wordpress.org/plugins/custom-post-type-taxonomy-archives/), like 7 years old. It did the trick. πŸ™‚

    Lead Developer
    Lead Developer

    The custom functions you pasted in your reply above.

    Something must be interfering with the permalinks, as /category/name is a typical WP permalink structure. Perhaps try deactivating your other plugins/custom functions and then re-add them one by one to see if it’s a plugin issue.


    I deactivated all the plugins, reactivated one by one, and nothing happen. I’m pretty happy that it works, now I can sleep at night. πŸ™‚ If this is something that you’ll like to check for you, I have no problem sending you the pass to check some things.

    Lead Developer
    Lead Developer

    It’s all working as it should now?


    Yes. Everything’s perfect.

    Lead Developer
    Lead Developer
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.